diff options
author | Thomas Haller <thaller@redhat.com> | 2016-01-22 10:47:07 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-02-25 15:09:51 +0100 |
commit | 0907ad6cd82ea402e84ce50457357d6775691988 (patch) | |
tree | e8681cdb8aae699c8843395c1a731f4f9ae15e4e | |
parent | a3c0166a2064c41408d1e08defee3a7e4a0ce3f7 (diff) | |
download | NetworkManager-0907ad6cd82ea402e84ce50457357d6775691988.tar.gz |
travis: move build script to a separate script and improve debugging for failed tests
(cherry picked from commit 34050e9c0b6bd079c9982f72537cd3be372aa6e7)
-rw-r--r-- | .travis.yml | 2 | ||||
-rwxr-xr-x | contrib/travis/travis-run.sh | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index b7e2d04589..61e702c679 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,4 @@ before_install: - sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' - sudo apt-get update - sudo apt-get install libnl-3-dev libndp-dev automake -script: "sh autogen.sh --with-systemd-logind=no --enable-more-warnings=no && make -j6 && make -k check" +script: "./contrib/travis/travis-run.sh" diff --git a/contrib/travis/travis-run.sh b/contrib/travis/travis-run.sh new file mode 100755 index 0000000000..1aef0fe34f --- /dev/null +++ b/contrib/travis/travis-run.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -ev + +print_test_logs() { + echo ">>>> PRINT TEST LOGS $1 (start)" + find -regex '.*/tests/[^/]+.log$' -exec sh -c 'echo ">>>>> LOGFILE $1"; cat "$1"' '--' '{}' ';' + echo ">>>> PRINT TEST LOGS $1 (done)" +} + +sh ./autogen.sh \ + --with-systemd-logind=no \ + --enable-more-warnings=no + +make -j6 + +if ! make check -k ; then + + print_test_logs "first-test" + + echo ">>>> RUN SECOND TEST (start)" + NMTST_DEBUG=TRACE,no-expect-messages make check -k || : + echo ">>>> RUN SECOND TEST (done)" + + print_test_logs "second-test" + + exit 57 +fi + |