about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2014-11-05 10:54:16 +0100
committerMichael Woerister <michaelwoerister@posteo>2014-11-05 13:32:09 +0100
commit37a823b223007da79da5c067782f6494b4771c4a (patch)
tree44c5840d576bbc657203c663fd114d0072b7ff38
parent2f215f644f3c0d5dc02859a125c4c060736bd250 (diff)
downloadrust-37a823b223007da79da5c067782f6494b4771c4a.tar.gz
rust-37a823b223007da79da5c067782f6494b4771c4a.zip
debuginfo: Add timeout before running executable in LLDB tests.
This should help with a potential race condition.
-rw-r--r--src/etc/lldb_batchmode.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py
index 467463a39c6..94c7af5e106 100644
--- a/src/etc/lldb_batchmode.py
+++ b/src/etc/lldb_batchmode.py
@@ -30,6 +30,7 @@ import sys
 import threading
 import re
 import atexit
+import time
 
 # Set this to True for additional output
 DEBUG_OUTPUT = False
@@ -175,6 +176,10 @@ try:
 
   for line in script_file:
     command = line.strip()
+    if command == "run" or command == "r" or re.match("^process\s+launch.*", command):
+      # Before starting to run the program, let the thread sleep a bit, so all
+      # breakpoint added events can be processed
+      time.sleep(0.5)
     if command != '':
       execute_command(command_interpreter, command)