Skip to content

Commit

Permalink
Speed up summarize.sh
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@3950 048f04df-13f5-43d7-8114-9f9ceecaec24
  • Loading branch information
magicant committed Dec 22, 2018
1 parent c98fbd8 commit 21a80c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/summarize.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# summarize.sh: extracts results of failed tests
# (C) 2015 magicant
# (C) 2015-2018 magicant
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -25,6 +25,12 @@ printf '=============\n\n'
passed=0 failed=0 skipped=0

for result_file do
# The "grep" command is generally faster than repeated "read" built-in.
if [ "$(grep -cE '^%%% (FAIL|SKIPP)ED:' "$result_file")" -eq 0 ]; then
passed="$((passed + $(grep -c '^%%% PASSED:' "$result_file")))"
continue
fi

log=''
while IFS= read -r line; do
log="$log
Expand Down

0 comments on commit 21a80c7

Please sign in to comment.