Avoid overly general solutions
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 09 Nov 2011 12:23:23 -0700
changeset 673 4615394f458a
parent 672 55aba401ca70
child 674 9008a98bdbc9
Avoid overly general solutions

Yes, I can do fancy stuff with making fifos that filter file output
through sed. Or I can just use the -I option to diff, which produces
more useful output anyway.
--- a/conformancetest/fixdata	Wed Nov 09 11:59:06 2011 -0700
+++ b/conformancetest/fixdata	Wed Nov 09 12:23:23 2011 -0700
@@ -10,11 +10,11 @@
 # reflects the differences in tests between Gecko and WebKit.  If any new tests
 # don't match between Gecko and WebKit, I want to know about it.
 diff -u webkit-data gecko-data | tail -n +3 > tmp-diff
-# The <() stuff gets rid of the exact numbers on the @@ lines before feeding
-# the two files to diff.  Then it will compare them.  If they differ, it will
+# Compare the diffs.  If they differ, other than just line numbers, it will
 # exit with a nonzero exit code, so set -e will cause the script to abort,
-# printing out the difference.
-diff -u <(sed s/^@@.*/@@/ < tmp-diff) <(sed s/^@@.*/@@/ < diff)
+# printing out the difference.  It will need to be manually reviewed to
+# identify why there's a new difference between WebKit and Gecko.
+diff -u -I ^@@ tmp-diff diff
 rm tmp-diff
 # The file "diff" contains the differences from WebKit to Gecko.  The file
 # "patch" is a manually-crafted subset, which contains only the differences