Shard testprojects integration tests #4205

Merged
merged 2 commits into from Jan 25, 2017

Conversation

Projects
None yet
5 participants
@stuhood
Member

stuhood commented Jan 25, 2017

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.

@stuhood stuhood requested review from jsirois, cheister, kwlzn and JieGhost Jan 25, 2017

@jsirois

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

This comment has been minimized.

@jsirois

jsirois Jan 25, 2017

Member

Looks like this needs a blank line above between it and from __future__ ....

@jsirois

jsirois Jan 25, 2017

Member

Looks like this needs a blank line above between it and from __future__ ....

@kwlzn

kwlzn approved these changes Jan 25, 2017

@JieGhost

LGTM!

@cheister

This comment has been minimized.

Show comment
Hide comment
@cheister

cheister Jan 25, 2017

Contributor

LGTM. Alternatively, is there a way to just make a test method for each testproject?

Contributor

cheister commented Jan 25, 2017

LGTM. Alternatively, is there a way to just make a test method for each testproject?

@stuhood stuhood merged commit 8da8fcf into pantsbuild:master Jan 25, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@stuhood stuhood deleted the twitter:stuhood/shard-testprojects-integration branch Jan 25, 2017

jebbench added a commit to jebbench/pants that referenced this pull request Jan 25, 2017

Merge pull request #1 from pantsbuild/master
Shard testprojects integration tests (#4205)

lenucksi added a commit to lenucksi/pants that referenced this pull request Apr 25, 2017

Shard testprojects integration tests (#4205)
### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment