From d11f5079f4358ec130e8c8f3d4a98d46539524b2 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#1770193 --- 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 278678e9..0698f189 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:-}"