Bug 1331846 - Exclude the lines which have "include" appeared in the middle. draft
authorTing-Yu Lin <tlin@mozilla.com>
Wed, 18 Jan 2017 11:20:56 +0800
changeset 463553 e8d9ef20eb4beb5e43c3b41136cb0ee190c43af4
parent 463342 96cb95af530477edb66ae48d98c18533476e57bb
child 542710 5f210e52e2d9747071f9427082b71fa2c9303a70
push id42102
push userbmo:tlin@mozilla.com
push dateThu, 19 Jan 2017 09:34:19 +0000
bugs1331846
milestone53.0a1
Bug 1331846 - Exclude the lines which have "include" appeared in the middle. Change "include" match rule from "^include" to "include " since there might be "skip-if" or other <failure-type> conditions before the "include". The single space after is added so that tests like "include.html" won't be excluded. DONTBUILD because this patch modifies a script checking for the validity of reftests, which is NPOTB. MozReview-Commit-ID: 3tFFIo8RKFp
layout/reftests/w3c-css/submitted/check-for-references.sh
--- a/layout/reftests/w3c-css/submitted/check-for-references.sh
+++ b/layout/reftests/w3c-css/submitted/check-for-references.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 
 cd "$(dirname "$0")"
 find . -name reftest.list | sed 's,/reftest.list$,,' | while read DIRNAME
 do
-    cat "$DIRNAME/reftest.list" | grep -v "^\(include\|default-preferences\)" | sed 's/ #.*//;s/^#.*//;s/.* == /== /;s/.* != /!= /' | grep -v "^ *$" | while read TYPE TEST REF
+    cat "$DIRNAME/reftest.list" | grep -v -e "^default-preferences" -e "include " | sed 's/ #.*//;s/^#.*//;s/.* == /== /;s/.* != /!= /' | grep -v "^ *$" | while read TYPE TEST REF
     do
         REFTYPE=""
         if [ "$TYPE" == "==" ]
         then
             REFTYPE="match"
         elif [ "$TYPE" == "!=" ]
         then
             REFTYPE="mismatch"