Optionally parallelize the testsuite#729
Merged
Merged
Conversation
.. otherwise the line which reports tests skipped and failed can come in different orders when -j values above 1 are used.
When requested via 'run-tests -j', more than one test will be run
at a time. On my system, (i5-3320m with 4 threads / 2 cores), this
reduces elapsed time by over 50% when testing pots/unix/micropython.
Elapsed time, seconds, best of 3 runs with each -j value:
before patchset: 18.1
-j1: 18.1
-j2: 11.3 (-37%)
-j4: 8.7 (-52%)
-j6: 8.4 (-54%)
In all cases the final output is identical:
651 tests performed (18932 individual testcases)
651 tests passed
23 tests skipped: buffered_writer...
though the individual pass/fail messages can be different/interleaved.
Notably, "--via-mpy" spews failures when threaded, possibly indicating that micropython is not creating mpy files in threadsafe manner.
Author
|
Sooooo this appears to actually slow down travis builds down in elapsed time. 😦 |
Member
|
I see it ~30 seconds longer for the unix part of the test. I'm willing to pay that price because it speeds it up for you locally. :-) |
Collaborator
|
We could put in a check for travis vs local. |
Author
|
@dhalbert just change each |
jepler
added a commit
to jepler/circuitpython
that referenced
this pull request
Apr 2, 2018
.. so explicitly set them to run serially with -j1. (as discussed on adafruit#729)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On my laptop with a 4-thread, 2-core CPU, this reduces the elapsed time taken to run the tests by about 50%. Here are some timings, though they're actually of micropython, not circuitpython:
This is the CircuitPython version of micropython#3694