Skip to content

Commit

Permalink
Correct travis.yml to only build extended tests when explicitely aske…
Browse files Browse the repository at this point in the history
…d to

The check for this was done by checking if $TRAVIS_EVENT_TYPE is
"pull_request".  The trouble is that when new data is pushed to an
already existing pull request, the event type is "push".

Better then to go with another documented variable, $TRAVIS_PULL_REQUEST,
which is "false" in non-PR builds.

Ref: https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables

Reviewed-by: Rich Salz <[email protected]>
(Merged from openssl#3205)
  • Loading branch information
levitte committed Apr 12, 2017
1 parent 6a71e06 commit 2da3f96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ matrix:

before_script:
- env
- if [ "$TRAVIS_EVENT_TYPE" == "pull_request" -a -n "$EXTENDED_TEST" ]; then
- if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
(git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
fi
- if [ -n "$DESTDIR" ]; then
Expand Down

0 comments on commit 2da3f96

Please sign in to comment.