aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2020-05-01 23:38:14 +0200
committerPeter Wu <peter@lekensteyn.nl>2020-05-02 17:04:52 +0000
commit6341185a4910371b1bcc23c9194dc523fa2e1220 (patch)
tree7b59187ec0c0b8e00a35b83b674a7ca72921b0ee /.travis.yml
parentbe63a17e542fe7f2df548db1816feaaec66417ea (diff)
travis: skip tests when the build fails
If the build fails, most tests will fail due to lack of tshark. Terminate early to avoid this. The "before_install" and "before_script" stages exit immediately with the first failing command, but "script" and "after_script" stages do not. This is due to "assert: false" in [1]. Explicitly call [2] to achieve the same exit-on-failure behavior. [1]: https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/stages.rb [2]: https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_assert.bash Remove unnecessary "cd" while at it, it only existed to workaround a bug with the cache directory on Windows. Change-Id: Iabdffc26d55bd5c08d27e400a67657d5e69a5c60 Reviewed-on: https://code.wireshark.org/review/37013 Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml4
1 files changed, 1 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index e8a144b585..ac58223912 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -73,12 +73,10 @@ before_script:
- cd build
- cmake -GNinja ..
script:
- - ninja
+ - ninja || travis_assert
- ninja test-programs
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
- pytest
- - cd ..
after_script:
- - cd build
- if [ -f run/tshark ]; then run/tshark --version; fi
- ../test/travis-upload-artifacts.sh