Bug 1646761 - Serialize test IDs rather than test class instances. r=jgraham
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Thu, 18 Jun 2020 20:46:55 +0000
changeset 536384 2581e284eb9a69b2a8342341bb480bbc20a28ece
parent 536383 3401f250ac61fd3c0b4633f6dfb1f27b1c84b8c8
child 536385 5048d0cf94c7c6af5a78655809cc7240dfc938e3
push id37520
push userdluca@mozilla.com
push dateFri, 19 Jun 2020 04:04:08 +0000
treeherdermozilla-central@d1a4f9157858 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1646761
milestone79.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 1646761 - Serialize test IDs rather than test class instances. r=jgraham Differential Revision: https://phabricator.services.mozilla.com/D80263
testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
@@ -456,23 +456,26 @@ class PathGroupedSource(GroupedSource):
         return {"scope": "/%s" % "/".join(state["prev_path"])}
 
 
 class GroupFileTestSource(TestSource):
     @classmethod
     def make_queue(cls, tests, **kwargs):
         tests_by_group = cls.tests_by_group(tests, **kwargs)
 
+        ids_to_tests = {test.id: test for test in tests}
+
         test_queue = Queue()
 
-        for group_name, tests in iteritems(tests_by_group):
+        for group_name, test_ids in iteritems(tests_by_group):
             group_metadata = {"scope": group_name}
             group = deque()
 
-            for test in tests:
+            for test_id in test_ids:
+                test = ids_to_tests[test_id]
                 group.append(test)
                 test.update_metadata(group_metadata)
 
             test_queue.put((group, group_metadata))
 
         return test_queue
 
     @classmethod
@@ -482,11 +485,11 @@ class GroupFileTestSource(TestSource):
 
         tests_by_group = defaultdict(list)
         for test in tests:
             try:
                 group = test_groups.group_by_test[test.id]
             except KeyError:
                 logger.error("%s is missing from test groups file" % test.id)
                 raise
-            tests_by_group[group].append(test)
+            tests_by_group[group].append(test.id)
 
         return tests_by_group