]> git.lizzy.rs Git - rust.git/commitdiff
debuginfo: Add timeout before running executable in LLDB tests.
authorMichael Woerister <michaelwoerister@posteo>
Wed, 5 Nov 2014 09:54:16 +0000 (10:54 +0100)
committerMichael Woerister <michaelwoerister@posteo>
Wed, 5 Nov 2014 12:32:09 +0000 (13:32 +0100)
This should help with a potential race condition.

src/etc/lldb_batchmode.py

index 467463a39c646b6227c935c040d1530bd046a391..94c7af5e1065cc7bb6938a1a3be91ebabb907466 100644 (file)
@@ -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)