Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a71c4b2

Browse filesBrowse files
committed
Making tox regression handle all local and Travis simultaneously.
1 parent 918b73e commit a71c4b2
Copy full SHA for a71c4b2

3 files changed

+20-10Lines changed: 20 additions & 10 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.travis.yml‎

Copy file name to clipboardExpand all lines: .travis.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ script:
88
- tox -e py26
99
- tox -e py27
1010
- tox -e lint
11-
- scripts/run_regression.sh
11+
- tox -e regression
1212
after_success:
1313
- tox -e cover
1414
- coveralls
Collapse file

‎scripts/run_regression.sh‎

Copy file name to clipboardExpand all lines: scripts/run_regression.sh
+18-8Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22

33
set -ev
44

5-
# If merging to master and not a pull request, run regression test.
6-
if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
7-
# Convert encrypted key file into decrypted file to be used.
8-
openssl aes-256-cbc -K $encrypted_a1b222e8c14d_key \
9-
-iv $encrypted_a1b222e8c14d_iv \
10-
-in regression/key.p12.enc \
11-
-out $GCLOUD_TESTS_KEY_FILE -d
12-
tox -e regression
5+
# If we're on Travis, we need to set up the environment.
6+
if [[ "${TRAVIS}" == "true" ]]; then
7+
# If merging to master and not a pull request, run regression test.
8+
if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
9+
echo "Running in Travis during merge, decrypting stored key file."
10+
11+
# Convert encrypted key file into decrypted file to be used.
12+
openssl aes-256-cbc -K $encrypted_a1b222e8c14d_key \
13+
-iv $encrypted_a1b222e8c14d_iv \
14+
-in regression/key.p12.enc \
15+
-out $GCLOUD_TESTS_KEY_FILE -d
16+
else
17+
echo "Running in Travis during non-merge to master, doing nothing."
18+
exit
19+
fi
1320
fi
21+
22+
# Run the regression tests for each tested package.
23+
python regression/run_regression.py --package datastore
Collapse file

‎tox.ini‎

Copy file name to clipboardExpand all lines: tox.ini
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ deps =
5757
basepython =
5858
python2.7
5959
commands =
60-
python regression/run_regression.py --package datastore
60+
{toxinidir}/scripts/run_regression.sh
6161
deps =
6262
unittest2

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.