Bug 1253189 part 4 - Add skip.list for skipping imported tests. r=dbaron draft
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 03 Mar 2016 18:27:18 +0800
changeset 340445 329c5e89d54a33f114d09d69c8d6960e4f15a233
parent 340444 940bc5d26d31dc0b1bc4ac2d96d7146b7e658443
child 340446 4949c0dd79a44f3450d6d858522a736109eca5e8
push id12962
push userxquan@mozilla.com
push dateTue, 15 Mar 2016 08:22:36 +0000
reviewersdbaron
bugs1253189
milestone48.0a1
Bug 1253189 part 4 - Add skip.list for skipping imported tests. r=dbaron MozReview-Commit-ID: 3TpjZRy8rS9
layout/reftests/w3c-css/import-tests.py
layout/reftests/w3c-css/skip.list
--- a/layout/reftests/w3c-css/import-tests.py
+++ b/layout/reftests/w3c-css/import-tests.py
@@ -52,16 +52,17 @@ gPrefixedProperties = [
 #
 # For example, when "@supports" was behind a pref, gDefaultPreferences had:
 #  "css3-conditional": "pref(layout.css.supports-rule.enabled,true)"
 gDefaultPreferences = {
 }
 
 gLog = None
 gFailList = {}
+gSkipList = {}
 gDestPath = None
 gSrcPath = None
 support_dirs_mapped = set()
 filemap = {}
 speclinkmap = {}
 propsaddedfor = []
 tests = []
 gOptions = None
@@ -270,30 +271,34 @@ def setup_paths():
     gSubtrees = newSubtrees
 
 def setup_log():
     global gLog
     # Since we're going to commit the tests, we should also commit
     # information about where they came from.
     gLog = open(os.path.join(gDestPath, "import.log"), "w")
 
-def read_fail_list():
-    global gFailList
+def read_fail_and_skip_list():
+    global gFailList, gSkipList
     dirname = os.path.realpath(__file__).split(os.path.sep)
     dirname = os.path.sep.join(dirname[:len(dirname)-1])
     failListFile = open(os.path.join(dirname, "failures.list"), "r")
     gFailList = [x for x in [x.lstrip().rstrip() for x in failListFile] if bool(x)
                  and not x.startswith("#")]
     failListFile.close()
+    skipListFile = open(os.path.join(dirname, "skip.list"), "r")
+    gSkipList = [x for x in [x.lstrip().rstrip() for x in skipListFile]
+                 if bool(x) and not x.startswith("#")]
+    skipListFile.close()
 
 def main():
-    global gDestPath, gLog, gTestfiles, gTestFlags, gFailList
+    global gDestPath, gLog, gTestfiles, gTestFlags, gFailList, gSkipList
     read_options()
     setup_paths()
-    read_fail_list()
+    read_fail_and_skip_list()
     setup_log()
     write_log_header()
     remove_existing_dirs()
     populate_test_files()
 
     for t in gTestfiles:
         add_test_items(t, spec=None)
 
@@ -317,15 +322,17 @@ def main():
         # and reftest.list always use '/' so we fix the paths here.
         test[key] = to_unix_path_sep(test[key])
         test[key + 1] = to_unix_path_sep(test[key + 1])
         testKey = test[key]
         if 'ahem' in testFlags:
             test = ["HTTP(../../..)"] + test
         if testKey in gFailList:
             test = ["fails"] + test
+        if testKey in gSkipList:
+            test = ["skip"] + test
         listfile.write(" ".join(test) + "\n")
     listfile.close()
 
     gLog.close()
 
 if __name__ == '__main__':
     main()
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/skip.list
@@ -0,0 +1,12 @@
+# LIST OF REFTEST NEED TO SKIP FROM IMPORTS
+#
+# Always consider adding tests to failures.list first if it doesn't
+# pass. This list should only be used if we are not able to make the
+# test itself work, e.g. some dynamic tests.
+#
+# The syntax of this file is as follows:
+#    1) All lines marked with a '#' are comments.
+#    2) A failure is denoted by a path, starting
+#       with module. E.g.:
+#         css3-multicol/block-clip-001.xht
+