-
Notifications
You must be signed in to change notification settings - Fork 100
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
Enable travis to run tests #154
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
sudo: required | ||
services: | ||
- docker | ||
env: | ||
global: | ||
- PA_TEST_ONLINE_INSTALLER=true | ||
matrix: | ||
- OTHER_TESTS=true | ||
- PRODUCT_TEST_GROUP=0 | ||
- PRODUCT_TEST_GROUP=1 | ||
- PRODUCT_TEST_GROUP=2 | ||
- PRODUCT_TEST_GROUP=3 | ||
- PRODUCT_TEST_GROUP=4 | ||
- PRODUCT_TEST_GROUP=5 | ||
- PRODUCT_TEST_GROUP=6 | ||
- PRODUCT_TEST_GROUP=7 | ||
install: | ||
- pip install --upgrade pip==6.1.1 | ||
- pip install -r requirements.txt | ||
before-script: | ||
- make docker-images | ||
script: | ||
- | | ||
if [ -v PRODUCT_TEST_GROUP ]; then | ||
PRODUCT_TESTS=$(find tests/product/ -name '*py' | grep -v __init__ | xargs wc -l | sort -n | head -n -1 | awk '{print $2}' | awk "NR % 8 == $PRODUCT_TEST_GROUP" | tr '\n' ' ') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest combining the last two awk commands into awk "NR % 8 == $PRODUCT_TEST_GROUP { print $2 }", but it's up to you. |
||
tox -e py26 -- -a '!quarantine,!offline_installer' $PRODUCT_TESTS | ||
fi | ||
- | | ||
if [ -v OTHER_TESTS ]; then | ||
make clean lint docs test test-rpm | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[wheel] | ||
universal = 0 | ||
[nosetests] | ||
verbosity=3 | ||
verbosity=3 |
This file contains 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
This file contains 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
This file contains 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
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.
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.
I just pushed #160 so that when we have future infra issues, we don't fail to build the base image for every test case. This means that the base image needs to be built prior to running the test cases. You can do this with
make docker-images
, I took a quick look at the travis docs, it looks like that should happen in abefore-script
section so that if it fails we won't try to run the product tests.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.
Great, so now product test execution should take less time, shouldn't it?