aboutsummaryrefslogtreecommitdiffstats
path: root/compare-results.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-09-06 14:30:03 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-09-06 14:35:07 +0200
commit2068f43d68c90ef2742040e28395e7512b29c41b (patch)
treed1a5e459baa5b35460c7fa544307ad9cce2ee467 /compare-results.sh
parenta9acec4c211c9fdbbb2d812a62f9142f8b21d062 (diff)
compare_results.sh: less drastic wording
We don't currently fail test runs from mismatching results, it's just for human convenience. So don't say things like "Failing due to skipped tests", it's confusing. Summarize once the need to update results instead. Change-Id: Ibafa75bd54df07253780c6af3a68a0a4d148e64b
Diffstat (limited to 'compare-results.sh')
-rwxr-xr-xcompare-results.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/compare-results.sh b/compare-results.sh
index 708f59dc..cce3a8d4 100755
--- a/compare-results.sh
+++ b/compare-results.sh
@@ -152,6 +152,8 @@ done <<< "$(grep "<testcase" "$results_file")"
echo "--------------------"
overall_verdict=0
+ask_update=""
+
if [ "x$pass" != x0 ]; then
echo "$pass pass"
fi
@@ -162,25 +164,25 @@ fi
if [ "x$skipped" != x0 ]; then
echo "$skipped skipped"
+ ask_update="$ask_update removed=$skipped"
if [ "x$allow_skip" = x0 ]; then
overall_verdict=4
- echo " Failing due to skipped tests. If tests were removed, update the expected results!"
fi
fi
if [ "x$new" != x0 ]; then
echo "$new new"
+ ask_update="$ask_update new=$new"
if [ "x$allow_new" = x0 ]; then
overall_verdict=3
- echo " Failing due to new tests. Update the expected results!"
fi
fi
if [ "x$more_successes" != x0 ]; then
echo "$more_successes pass unexpectedly"
+ ask_update="$ask_update xpass=$more_successes"
if [ "x$allow_xpass" = x0 ]; then
overall_verdict=2
- echo " Update the expected results!"
fi
fi
@@ -189,10 +191,9 @@ if [ "x$more_failures" != x0 ]; then
overall_verdict=1
fi
-echo
-if [ "x$overall_verdict" != x0 ]; then
- echo "FAILURE"
-else
- echo "ok"
+if [ -n "$ask_update" ]; then
+ echo
+ echo "(Please update the expected results:$ask_update)"
fi
+
exit $overall_verdict