-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shard testprojects integration tests #4205
Shard testprojects integration tests #4205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Stu - seems like this will do fine.
@@ -4,16 +4,22 @@ | |||
|
|||
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, | |||
unicode_literals, with_statement) | |||
import math |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this needs a blank line above between it and from __future__ ...
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM. Alternatively, is there a way to just make a test method for each testproject? |
Shard testprojects integration tests (pantsbuild#4205)
### Problem See pantsbuild#4204: because all tests defined under testprojects are run in a single test method and pytest only outputs anything when a method has completed, travis began failing test runs due to lack of output. Additionally, when this test failed, your only recourse was to run the entire thing. ### Solution Split the test into "select targets to test" and "test them", and then shard the result N ways on a method-by-method basis. In theory this could have been done bash-wise in `ci.sh`... but frankly, I don't want to grow a bash script if I can avoid it. ### Result The test is now sharded `N==8` ways.
Problem
See #4204: because all tests defined under testprojects are run in a single test method and pytest only outputs anything when a method has completed, travis began failing test runs due to lack of output. Additionally, when this test failed, your only recourse was to run the entire thing.
Solution
Split the test into "select targets to test" and "test them", and then shard the result N ways on a method-by-method basis. In theory this could have been done bash-wise in
ci.sh
... but frankly, I don't want to grow a bash script if I can avoid it.Result
The test is now sharded
N==8
ways.