[lldb] Add a sleep to TestObjectFileJSON
authorPavel Labath <pavel@labath.sk>
Fri, 14 Apr 2023 12:36:27 +0000 (14:36 +0200)
committerPavel Labath <pavel@labath.sk>
Fri, 14 Apr 2023 12:37:32 +0000 (14:37 +0200)
The test fails when the two generated files have the same timestamp
(lldb uses second granularity).

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

index 04f91ec..67d9f8e 100644 (file)
@@ -7,6 +7,7 @@ import json
 import uuid
 import os
 import shutil
+import time
 
 
 class TestObjectFileJSON(TestBase):
@@ -80,6 +81,9 @@ class TestObjectFileJSON(TestBase):
                 }
             ],
         }
+
+        # Sleep to ensure the new file has a different timestamp
+        time.sleep(2)
         self.emitJSON(data, json_object_file)
 
         module = target.AddModule(self.toModuleSpec(json_object_file))