But 1253189 part 4 - Add skip.list for skipping imported tests. draft
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 03 Mar 2016 18:27:18 +0800
changeset 336654 3ad258e7899d395776a828b7431188c47b793962
parent 336653 6868f3f1dcb1c59f30483f3951345ed17b6fb5a0
child 336655 49a0c9d23d18aa69212a32fe71308c664ccc4426
push id12164
push userxquan@mozilla.com
push dateFri, 04 Mar 2016 01:00:50 +0000
bugs1253189
milestone47.0a1
But 1253189 part 4 - Add skip.list for skipping imported tests. 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
@@ -276,30 +277,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)
 
@@ -323,15 +328,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
+