From 0c17da012f26d81ddb2c8df75dab5850d91a6dc6 Mon Sep 17 00:00:00 2001 From: Charles Herlin Date: Fri, 15 Feb 2019 16:27:54 +0100 Subject: [PATCH] FIX(test): catch return values when retval differs to avoid runtime error --- tests/launch_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/launch_tests.sh b/tests/launch_tests.sh index 6871ebf..81dcff5 100755 --- a/tests/launch_tests.sh +++ b/tests/launch_tests.sh @@ -103,10 +103,10 @@ play_consistency_tests() { printf "\033[34m*** [%03d] %s::%s Root/Sudo Consistency Tests\033[0m\n" "$testno" "$test_file" "$usecase" retfile_root=$outdir/${usecase_name_root}.retval retfile_sudo=$outdir/${usecase_name_sudo}.retval - ret=$(eval cmp "$retfile_root" "$retfile_sudo") + cmp "$retfile_root" "$retfile_sudo" && ret=0 || ret=1 if [[ ! 0 -eq $ret ]] ; then fail "$name" return values differ - diff "$retfile_root" "$retfile_sudo" + diff "$retfile_root" "$retfile_sudo" || true consist_test=1 else ok "$name return values are equal"