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
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 @@
     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 @@
 
     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"