[llvm] 11e02d5 - [lit] Only update specific fields from remote test object

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 17:04:01 PDT 2020


Author: Julian Lettner
Date: 2020-05-01T17:03:54-07:00
New Revision: 11e02d5c24f9badc0ff34afc9538774f67cc8c50

URL: https://github.com/llvm/llvm-project/commit/11e02d5c24f9badc0ff34afc9538774f67cc8c50
DIFF: https://github.com/llvm/llvm-project/commit/11e02d5c24f9badc0ff34afc9538774f67cc8c50.diff

LOG: [lit] Only update specific fields from remote test object

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.

Added: 
    

Modified: 
    llvm/utils/lit/lit/run.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index d0e7e65aae1e..5aef77e5f605 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -99,9 +99,11 @@ def _wait_for(self, async_results, deadline):
 
     # 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


        


More information about the llvm-commits mailing list