summaryrefslogtreecommitdiffstats
path: root/compare-results.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-09-06 14:33:37 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-09-06 14:33:55 +0200
commita9acec4c211c9fdbbb2d812a62f9142f8b21d062 (patch)
tree40f853d4902c9dbfcd6de0882195fe4e8289d180 /compare-results.sh
parent873ae201bd4d6252b3ab1543a1453dc4f88ea509 (diff)
compare_results.sh: speed up comparison loop
The script takes quite long to parse each and every line O(n**2). Rather directly pick only those lines that contain the test name in the grep that feeds into the loop. Change-Id: I0d4987b11c3feaef3a7fc56d764c43386865004f
Diffstat (limited to 'compare-results.sh')
-rwxr-xr-xcompare-results.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/compare-results.sh b/compare-results.sh
index cb80a0d..708f59d 100755
--- a/compare-results.sh
+++ b/compare-results.sh
@@ -112,7 +112,7 @@ while read line; do
fi
matched="1"
break
- done <<< "$(grep "<testcase" "$results_file")"
+ done <<< "$(grep "<testcase.*$exp_test_name" "$results_file")"
if [ "x$matched" = "x0" ]; then
echo "skipped $exp_suite_name.$exp_test_name"
@@ -140,7 +140,7 @@ while read line; do
matched="1"
break
- done <<< "$(grep "<testcase" "$expected_file")"
+ done <<< "$(grep "<testcase.*$test_name" "$expected_file")"
if [ "x$matched" = "x0" ]; then
echo "NEW-$got_test_result $got_suite_name.$got_test_name"