[Lldb-commits] [lldb] r266145 - Fix breakpoint_set_restart test for Windows

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 12 15:45:04 PDT 2016


Author: amccarth
Date: Tue Apr 12 17:45:03 2016
New Revision: 266145

URL: http://llvm.org/viewvc/llvm-project?rev=266145&view=rev
Log:
Fix breakpoint_set_restart test for Windows

When run with the multiprocess test runner, the getchar() trick doesn't work, so ninja check-lldb would fail on this test, but running the test directly worked fine.

Differential Revision: http://reviews.llvm.org/D19035

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp?rev=266145&r1=266144&r2=266145&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp Tue Apr 12 17:45:03 2016
@@ -7,12 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <iostream>
+#include <chrono>
 #include <stdio.h>
+#include <thread>
+
 
 int main(int argc, char const *argv[])
 {
-    getchar();
+    static bool done = false;
+    while (!done)
+    {
+      std::this_thread::sleep_for(std::chrono::milliseconds{100});
+    }
     printf("Set a breakpoint here.\n");
     return 0;
 }




More information about the lldb-commits mailing list