summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-01-03 22:34:48 +0000
committerAdrian Prantl <aprantl@apple.com>2019-01-03 22:34:48 +0000
commita07bba60d0f0ee4890aa2939b0d66735a5cb616d (patch)
tree6305c5e699face428da6871ef9e3cc780d6c1edd /lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
parent58c61dce1d8313b875ccaa18913915a0717c845d (diff)
downloadbcm5719-llvm-a07bba60d0f0ee4890aa2939b0d66735a5cb616d.tar.gz
bcm5719-llvm-a07bba60d0f0ee4890aa2939b0d66735a5cb616d.zip
TestQueues: Move the synchronisation code into the binary itself.
Thanks to Pavel Labath for the suggestion! llvm-svn: 350360
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py b/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
index 2cd685bb758..c0becc51ad5 100644
--- a/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
+++ b/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
@@ -30,16 +30,6 @@ class TestQueues(TestBase):
# Find the line numbers that we will step to in main:
self.main_source = "main.c"
- def remove_token(self, name):
- for i in range(7):
- token = name+'.token.%d'%i
- if os.path.exists(token):
- os.remove(token)
-
- def await_token(self, name):
- for i in range(7):
- lldbutil.wait_for_file_on_target(self, name+'.token.%d'%i)
-
def check_queue_for_valid_queue_id(self, queue):
self.assertTrue(
queue.GetQueueID() != 0, "Check queue %s for valid QueueID (got 0x%x)" %
@@ -122,14 +112,12 @@ class TestQueues(TestBase):
self.main_source_spec = lldb.SBFileSpec(self.main_source)
break1 = target.BreakpointCreateByName("stopper", 'a.out')
self.assertTrue(break1, VALID_BREAKPOINT)
- self.remove_token(exe)
process = target.LaunchSimple(
- [exe+'.token.'], None, self.get_process_working_directory())
+ [], None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
if len(threads) != 1:
self.fail("Failed to stop at breakpoint 1.")
- self.await_token(exe)
queue_submittor_1 = lldb.SBQueue()
queue_performer_1 = lldb.SBQueue()
@@ -283,9 +271,8 @@ class TestQueues(TestBase):
if self.getArchitecture() in ['arm', 'arm64', 'arm64e', 'arm64_32', 'armv7', 'armv7k']:
libbtr_path = "/Developer/usr/lib/libBacktraceRecording.dylib"
- self.remove_token(exe)
process = target.LaunchSimple(
- [exe+'.token.'],
+ [],
[
'DYLD_INSERT_LIBRARIES=%s' % (libbtr_path),
'DYLD_LIBRARY_PATH=/usr/lib/system/introspection'],
@@ -297,7 +284,6 @@ class TestQueues(TestBase):
threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
if len(threads) != 1:
self.fail("Failed to stop at breakpoint 1.")
- self.await_token(exe)
libbtr_module_filespec = lldb.SBFileSpec("libBacktraceRecording.dylib")
libbtr_module = target.FindModule(libbtr_module_filespec)
OpenPOWER on IntegriCloud