Bug 1547086 Part 1 - Improve import-test.py, and regenerate received/reftest.list. r=dbaron
authorTing-Yu Lin <tlin@mozilla.com>
Sat, 27 Apr 2019 22:03:54 +0000
changeset 471669 145b3692b5935a43e3789c448b521f06e778f1c1
parent 471668 120e27d9bb9e38735e003e0e0fbbba522d41f940
child 471670 09a1e16dfaf1ec52411572132ec73ba444f2288d
push id35925
push userdluca@mozilla.com
push dateSun, 28 Apr 2019 09:38:09 +0000
treeherdermozilla-central@fd9f15fe0ec1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1547086
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547086 Part 1 - Improve import-test.py, and regenerate received/reftest.list. r=dbaron import.log and reftest.list are generated automatically. I run import-test.py on Linux, and the filenames in import.log are not sorted properly, so I make them sort case-insensitively to reproduce the exact same order in import.log. Differential Revision: https://phabricator.services.mozilla.com/D29064
layout/reftests/w3c-css/import-tests.py
layout/reftests/w3c-css/received/import.log
layout/reftests/w3c-css/received/reftest.list
--- a/layout/reftests/w3c-css/import-tests.py
+++ b/layout/reftests/w3c-css/import-tests.py
@@ -4,16 +4,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 import os
 from optparse import OptionParser
 from subprocess import Popen, PIPE
 import xml.dom.minidom
 import html5lib
 import fnmatch
 import shutil
+import string
 import sys
 import re
 
 # FIXME:
 #   * Import more tests rather than just the very limited set currently
 #     chosen.
 #   * Read in a (checked-in) input file with a list of test assertions
 #     expected to fail.
@@ -153,17 +154,17 @@ def copy_support_files(test, dirname):
     global gSrcPath
     if dirname in support_dirs_mapped:
         return
     support_dirs_mapped.add(dirname)
     support_dir = os.path.join(dirname, "support")
     if not os.path.exists(support_dir):
         return
     for dirpath, dirnames, filenames in os.walk(support_dir):
-        for srcname in filenames:
+        for srcname in sorted(filenames, key=string.lower):
             if srcname == "LOCK":
                 continue
             full_srcname = os.path.join(dirpath, srcname)
             destname = to_unix_path_sep(os.path.relpath(full_srcname, gSrcPath))
             copy_file(test, full_srcname, destname, True)
 
 def map_file(srcname):
     global gSrcPath
@@ -341,17 +342,23 @@ def main():
     write_log_header()
     remove_existing_dirs()
     populate_test_files()
 
     for t in gTestfiles:
         add_test_items(t)
 
     listfile = open(os.path.join(gDestPath, "reftest.list"), "wb")
-    listfile.write("# THIS FILE IS AUTOGENERATED BY {0}\n# DO NOT EDIT!\n".format(os.path.basename(__file__)))
+    listfile.write(
+        """# THIS FILE IS AUTOGENERATED BY {0}
+# DO NOT EDIT!!!
+# To update the test expectations, please edit failures.list, and rerun
+# {0} locally on web platform tests repository against the
+# revision listed at the beginning of received/import.log.\n\n"""\
+        .format(os.path.basename(__file__)))
     lastDefaultPreferences = None
     for test in tests:
         defaultPreferences = gDefaultPreferences.get(test[1].split("/")[0], None)
         if defaultPreferences != lastDefaultPreferences:
             if defaultPreferences is None:
                 listfile.write("\ndefault-preferences\n\n")
             else:
                 listfile.write("\ndefault-preferences {0}\n\n".format(defaultPreferences))
--- a/layout/reftests/w3c-css/received/import.log
+++ b/layout/reftests/w3c-css/received/import.log
@@ -1,10 +1,10 @@
 Importing revision: 15f199c91a72b0d51bf0a12b3b77827ecb5051ff
-from repository: https://github.com/neerjapancholi/web-platform-tests.git
+from repository: https://github.com/web-platform-tests/wpt.git
 Importing css-conditional/OWNERS to css-conditional/OWNERS
 Importing css-conditional/at-media-whitespace-optional-001.html to css-conditional/at-media-whitespace-optional-001.html
 Importing css-conditional/reference/background-lime.html to css-conditional/reference/background-lime.html
 Importing css-conditional/at-media-whitespace-optional-002.html to css-conditional/at-media-whitespace-optional-002.html
 Importing css-conditional/at-supports-001.html to css-conditional/at-supports-001.html
 Importing css-conditional/at-supports-001-ref.html to css-conditional/at-supports-001-ref.html
 Importing css-conditional/at-supports-002.html to css-conditional/at-supports-002.html
 Importing css-conditional/at-supports-003.html to css-conditional/at-supports-003.html
--- a/layout/reftests/w3c-css/received/reftest.list
+++ b/layout/reftests/w3c-css/received/reftest.list
@@ -1,10 +1,14 @@
 # THIS FILE IS AUTOGENERATED BY import-tests.py
-# DO NOT EDIT!
+# DO NOT EDIT!!!
+# To update the test expectations, please edit failures.list, and rerun
+# import-tests.py locally on web platform tests repository against the
+# revision listed at the beginning of received/import.log.
+
 == css-conditional/at-media-whitespace-optional-001.html css-conditional/reference/background-lime.html
 == css-conditional/at-media-whitespace-optional-002.html css-conditional/reference/background-lime.html
 == css-conditional/at-supports-001.html css-conditional/at-supports-001-ref.html
 == css-conditional/at-supports-002.html css-conditional/at-supports-001-ref.html
 == css-conditional/at-supports-003.html css-conditional/at-supports-001-ref.html
 == css-conditional/at-supports-004.html css-conditional/at-supports-001-ref.html
 == css-conditional/at-supports-005.html css-conditional/at-supports-001-ref.html
 == css-conditional/at-supports-006.html css-conditional/at-supports-001-ref.html