• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision3985 (tree)
Time2019-02-11 20:44:59
Authormagicant

Log Message

tests/summarize: Don't abort if no tests passed

The "grep" command returns an exit status of zero if there is no
successful test. This should not cause the "summarize.sh" script to
abort due to the "errexit" shell option.

Change Summary

Incremental Difference

--- yash/trunk/tests/summarize.sh (revision 3984)
+++ yash/trunk/tests/summarize.sh (revision 3985)
@@ -1,5 +1,5 @@
11 # summarize.sh: extracts results of failed tests
2-# (C) 2015-2018 magicant
2+# (C) 2015-2019 magicant
33 #
44 # This program is free software: you can redistribute it and/or modify
55 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
2727 for result_file do
2828 # The "grep" command is generally faster than repeated "read" built-in.
2929 if [ "$(grep -cE '^%%% (FAIL|SKIPP)ED:' "$result_file")" -eq 0 ]; then
30- passed="$((passed + $(grep -c '^%%% PASSED:' "$result_file")))"
30+ passed="$((passed + $(grep -c '^%%% PASSED:' "$result_file" || true)))"
3131 continue
3232 fi
3333
Show on old repository browser