Allow automatic re-running of failed tests#401
Conversation
713d5ee to
857af1a
Compare
There was a problem hiding this comment.
It's not precisely identical to the previous one (needing all-basic to include tests/basic means that all-tool would include tests/tool if it existed, etc.) but I figured that was OK!
857af1a to
481f9bc
Compare
There was a problem hiding this comment.
I'd much rather have MAX_RETRIES set in config/Makefile, rather than doing auto-config on the fly.
There was a problem hiding this comment.
Oops - at the very least, it should have been above the include, to allow config/Makefile to override the automatic default! I'll move it to the Windows Makefiles and update configure appropriately (if it's going "globally", I guess MAX_TESTSUITE_DIR_RETRIES might be a better name?)
cab2661 to
a47930e
Compare
|
|
|
I'm ok for merging; @damiendoligez? |
a47930e to
ddd50fc
Compare
|
Forgive me for adding additional commits here, but the work wants to be based on the refactored awk script from here, rather than trunk.
|
971236d to
e818abe
Compare
|
You can see the Unix output on lines 3369-3378 of the Travis build, but here for comparison is the testsuite output from an x86 VS 2015 build of dra27/ocaml/visual-studio (which is a merging of all my various pending pull requests) |
e818abe to
d33a304
Compare
Do you have an idea about the cause of these "random" failures? |
|
They've included:
but the automatic re-run had passes with no issues. Note that my patch does clean out the test before retrying, so it shouldn't ever be the case that a re-run becomes a systemic requirement of a test. |
|
I forgot the principal culprit:
|
|
Thanks for the info. I was guessing that Cygwin might be suspected, but is that a documented fact? |
|
Well, it's not really a bug - it's just that running make (especially in parallel - I saw it a lot working on OPAM - though I haven't been parallelising anything here), there's a lot of fork-ing going on and Cygwin's emulation of fork is incredibly complicated. As far as I can tell, it's essentially caused by momentarily running out of resources. |
|
I confirm that I've seen random failures for the threads tests on all platforms (but with different frequencies). |
d33a304 to
eeed995
Compare
|
Note that this will need rebasing again once #366 is merged - the conflict resolution isn't totally obvious (see https://github.com/dra27/ocaml/tree/visual-studio) |
MAX_TESTSUITE_DIR_RETRIES (which defaults to 1 for the native Windows ports and 0 for all other platforms) causes the `all` and `list` targets to re-run any given test directory an additional number of times in order to eliminate random failures during tests.
switch is a GNU extension - not supported, for example, by the default installation of awk on Ubuntu.
Some Makefile's displayed "=> skipped" lines; some Makefile's displayed a summary line including the word skipped; most Makefile's are simply silent if tests are skipped. Silent obviously doesn't discern between "skipped" and "broken"! Patch alters all existing to display an explicit "=> skipped" for any test which is skipped (including ocamlopt tests if `BYTECODE_ONLY=true`). The summary is updated to include: - The number of skipped tests, and their names (if all tests are skipped in a directory then just the directory name is displayed) - The total number of tests considered - which should therefore be the same on all platforms in all configurations
David R Allsopp -- pedantically eschewing lazy plural(s) since 1994.
Testsuite directories should now display " => skipped" for each test, rather than simply displaying nothing.
eeed995 to
771d1bd
Compare
|
That all seems fine (x86 and x64 testsuite pass with Visual Studio 2015) - Travis should hopefully agree shortly. |
GPR#401: Allow automatic re-running of failed tests
Optimize bits_of_float / float_of_bits with memory operands
Co-authored-by: Thibaut <thibaut.mattio@gmail.com>
Various tests are documented as occasionally failing (e.g. lib-threads) - some commands, especially in the Windows ports, can fail randomly and simply need to be re-run.
This patch adds a
MAX_RETRIESsetting totestsuite/Makefilewhich permits automatically re-running an entire directory of tests upMAX_RETRIEStimes if any of the tests fail. The summary-generator is updated to display the union of all the test results - i.e. if a test passes in any of the runs, then it is deemed to have passed.May hopefully provide a slightly more reliable (or quiet) testsuite mode for Windows CI builds.
I tried an earlier version for re-running the specific test that failed, rather than the entire directory, but that very quickly became a very invasive change...