[lit] Only update specific fields from remote test object
authorJulian Lettner <julian.lettner@apple.com>
Fri, 1 May 2020 16:51:46 +0000 (09:51 -0700)
committerJulian Lettner <julian.lettner@apple.com>
Sat, 2 May 2020 00:03:54 +0000 (17:03 -0700)
Don't update whole test object from the remote (pickled) finished test
object.  Doing so also changes the config and suite members, which we
want to avoid.

llvm/utils/lit/lit/run.py

index d0e7e65..5aef77e 100644 (file)
@@ -99,9 +99,11 @@ class Run(object):
 
     # Update local test object "in place" from remote test object.  This
     # ensures that the original test object which is used for printing test
-    # results reflect the changes.
+    # results reflects the changes.
     def _update_test(self, local_test, remote_test):
-        local_test.__dict__.update(remote_test.__dict__)
+        # Needed for getMissingRequiredFeatures()
+        local_test.requires = remote_test.requires
+        local_test.result = remote_test.result
 
     # TODO(yln): interferes with progress bar
     # Some tests use threads internally, and at least on Linux each of these