[Lldb-commits] [lldb] 09ba7b6 - [lldb] Add a sleep to TestObjectFileJSON

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 14 05:38:48 PDT 2023


Author: Pavel Labath
Date: 2023-04-14T14:37:32+02:00
New Revision: 09ba7b605327812cfcec4f3c01d7fc232dee651d

URL: https://github.com/llvm/llvm-project/commit/09ba7b605327812cfcec4f3c01d7fc232dee651d
DIFF: https://github.com/llvm/llvm-project/commit/09ba7b605327812cfcec4f3c01d7fc232dee651d.diff

LOG: [lldb] Add a sleep to TestObjectFileJSON

The test fails when the two generated files have the same timestamp
(lldb uses second granularity).

Added: 
    

Modified: 
    lldb/test/API/macosx/symbols/TestObjectFileJSON.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/symbols/TestObjectFileJSON.py b/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
index 04f91ec62f88b..67d9f8e3c5d02 100644
--- a/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
+++ b/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
@@ -7,6 +7,7 @@
 import uuid
 import os
 import shutil
+import time
 
 
 class TestObjectFileJSON(TestBase):
@@ -80,6 +81,9 @@ def test_module(self):
                 }
             ],
         }
+
+        # Sleep to ensure the new file has a 
diff erent timestamp
+        time.sleep(2)
         self.emitJSON(data, json_object_file)
 
         module = target.AddModule(self.toModuleSpec(json_object_file))


        


More information about the lldb-commits mailing list