From 7945d00aa17dd18fb63750941a34656ebf039c91 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Fri, 25 Oct 2019 14:04:32 +0300 Subject: [PATCH] tests: Ensure failure if beakerlib results file not found In example here https://209.132.184.41:8493/logs/pull-887-20191025-100505-509b9eae-weldr-lorax--fedora-31-tar/log.html we're seeing stuff like: /tests/test_cli.sh: line 109: /tmp/composer-test.wIAITH/TestResults: No such file or directory but the result is PASS Cherry-picked from 2b578dcee8156ff20f4da781d8774f3820fddf08 Related: rhbz#1769525 --- tests/cli/lib/lib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/cli/lib/lib.sh b/tests/cli/lib/lib.sh index 379ea76c..38aff24f 100755 --- a/tests/cli/lib/lib.sh +++ b/tests/cli/lib/lib.sh @@ -37,6 +37,9 @@ run_beakerlib_tests() { } parse_beakerlib_results() { + if [ ! -f "$BEAKERLIB_DIR/TestResults" ]; then + exit "$BEAKERLIB_DIR/TestResults not found" 1 + fi . $BEAKERLIB_DIR/TestResults TESTRESULT_RESULT_ECODE="${TESTRESULT_RESULT_ECODE:-}"