bpo-30283: Backport regrtest features from master to 2.7#1516
Conversation
Replace PermissionError with OSError and check on exc.errno. PermissionError was added to Python 3.3.
* Add the state of the test: passed, failed, etc. * If a test took longer than 30 seconds, log its execution time
|
Example of output, parallel mode: Another example of sequential run (test_sys modified to fail): |
Display running tests every 30 seconds if no test completed in the meanwhile.
|
Ok, the patch serie is now ready for a review :-) Sorry, I forgot two changes. Now it should be complete to be able to debug buildbot hang. |
| current_test = worker.current_test | ||
| if not current_test: | ||
| continue | ||
| dt = time.time() - worker.start_time |
There was a problem hiding this comment.
Possible race condition. current_test can be the old test, but worker.start_time is the start time of the next test. This can be avoided if save (current_test, start_time) as a tuple.
There was a problem hiding this comment.
Right. It's a deliberate choice to not use locks here, the output is just for debug purpose, I prefer simple code over correctness. Again, it's just a backport, if you want to enhance the code, it should be done first in the master branch ;-)
There was a problem hiding this comment.
By the way, nice catch ;-)
|
Merged, thanks for the review @serhiy-storchaka. I may fix regrtest in master later since you made multiple suggestions in this PR and the previous one. |
This patch serie also takes in account @serhiy-storchaka review on my previous PR #1513.