[PATCH v1 1/3] travis-ci: move "after_failure" code to dedicated file in /ci
From: <hidden>
Date: 2016-06-16 02:19:33
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Lars Schneider <redacted> Move the code and adjust it to the Git shell script coding guidelines. Signed-off-by: Lars Schneider <redacted> --- .travis.yml | 12 +----------- ci/test-report.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 11 deletions(-) create mode 100755 ci/test-report.sh
diff --git a/.travis.yml b/.travis.yml
index adab5b8..a93ecb3 100644
--- a/.travis.yml
+++ b/.travis.yml@@ -101,17 +101,7 @@ script: make --quiet test after_failure: - > : '<-- Click here to see detailed test output! '; - for TEST_EXIT in t/test-results/*.exit; - do - if [ "$(cat "$TEST_EXIT")" != "0" ]; - then - TEST_OUT="${TEST_EXIT%exit}out"; - echo "------------------------------------------------------------------------"; - echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)"; - echo "------------------------------------------------------------------------"; - cat "${TEST_OUT}"; - fi; - done; + ./ci/test-report.sh notifications: email: false
diff --git a/ci/test-report.sh b/ci/test-report.sh
new file mode 100755
index 0000000..d08a999
--- /dev/null
+++ b/ci/test-report.sh@@ -0,0 +1,19 @@ +#!/bin/sh +# +# Print test results +# +for TEST_EXIT in t/test-results/*.exit +do + if test "$(cat "$TEST_EXIT")" != "0" + then + TEST="${TEST_EXIT%.exit}" + TEST_OUT="${TEST}.out" + echo "------------------------------------------------------------------------" + echo " $(tput setaf 1)${TEST} Output$(tput sgr0)" + echo "------------------------------------------------------------------------" + cat "$TEST_OUT" + echo "" + echo "" + fi +done +
--
2.5.1