From 1945ffb09e4857fbe7e6b14310dbbcf84a50a361 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 30 Oct 2017 11:50:18 -0400 Subject: [PATCH] Cat the failed tox-envs Before failing the build we should print the problematic tox environments into the console to make it easier for folks to troubleshoot. We are still archiving the individual tox runs but the console logs will now also contain the errors. Issue: RELENG-611 Change-Id: Ie6fd132c0de69e8448d320d23daaed811a0d47a1 Signed-off-by: Thanh Ha --- .jjb-test/expected-xml/gerrit-python-tox-verify-master | 4 ++++ .jjb-test/expected-xml/github-python-tox-verify-master | 4 ++++ shell/tox-run.sh | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.jjb-test/expected-xml/gerrit-python-tox-verify-master b/.jjb-test/expected-xml/gerrit-python-tox-verify-master index 508a4f98..7fe44e71 100644 --- a/.jjb-test/expected-xml/gerrit-python-tox-verify-master +++ b/.jjb-test/expected-xml/gerrit-python-tox-verify-master @@ -352,6 +352,10 @@ fi if [ -f "$ARCHIVE_TOX_DIR/failed-envs.log" ]; then failed_envs=($(cat "$ARCHIVE_TOX_DIR/failed-envs.log")) + for e in "${failed_envs[@]}"; do + echo "cat $ARCHIVE_TOX_DIR/tox-$e.log" + cat "$ARCHIVE_TOX_DIR/tox-$e.log" + done echo "ERROR: Failed the following builds: ${failed_envs[*]}" exit 1 fi diff --git a/.jjb-test/expected-xml/github-python-tox-verify-master b/.jjb-test/expected-xml/github-python-tox-verify-master index b7019175..a60bb79b 100644 --- a/.jjb-test/expected-xml/github-python-tox-verify-master +++ b/.jjb-test/expected-xml/github-python-tox-verify-master @@ -314,6 +314,10 @@ fi if [ -f "$ARCHIVE_TOX_DIR/failed-envs.log" ]; then failed_envs=($(cat "$ARCHIVE_TOX_DIR/failed-envs.log")) + for e in "${failed_envs[@]}"; do + echo "cat $ARCHIVE_TOX_DIR/tox-$e.log" + cat "$ARCHIVE_TOX_DIR/tox-$e.log" + done echo "ERROR: Failed the following builds: ${failed_envs[*]}" exit 1 fi diff --git a/shell/tox-run.sh b/shell/tox-run.sh index 3bf15760..45cb1f20 100644 --- a/shell/tox-run.sh +++ b/shell/tox-run.sh @@ -49,6 +49,10 @@ fi if [ -f "$ARCHIVE_TOX_DIR/failed-envs.log" ]; then failed_envs=($(cat "$ARCHIVE_TOX_DIR/failed-envs.log")) + for e in "${failed_envs[@]}"; do + echo "cat $ARCHIVE_TOX_DIR/tox-$e.log" + cat "$ARCHIVE_TOX_DIR/tox-$e.log" + done echo "ERROR: Failed the following builds: ${failed_envs[*]}" exit 1 fi -- 2.16.6