Change in osmo-ttcn3-hacks[master]: compare_results.sh: less drastic wording

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Sep 6 12:35:24 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/10800


Change subject: compare_results.sh: less drastic wording
......................................................................

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
---
M compare-results.sh
1 file changed, 9 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/10800/1

diff --git a/compare-results.sh b/compare-results.sh
index 708f59d..cce3a8d 100755
--- a/compare-results.sh
+++ b/compare-results.sh
@@ -152,6 +152,8 @@
 echo "--------------------"
 overall_verdict=0
 
+ask_update=""
+
 if [ "x$pass" != x0 ]; then
   echo "$pass pass"
 fi
@@ -162,25 +164,25 @@
 
 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 @@
   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

-- 
To view, visit https://gerrit.osmocom.org/10800
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibafa75bd54df07253780c6af3a68a0a4d148e64b
Gerrit-Change-Number: 10800
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180906/eb8287a7/attachment.htm>


More information about the gerrit-log mailing list