amccarth created this revision. amccarth added reviewers: ovyalov, labath. amccarth added a subscriber: lldb-commits.
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. This replaces the getchar() call with an infinite loop. Thanks to Pavel for the insight. http://reviews.llvm.org/D19035 Files: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp @@ -7,12 +7,19 @@ // //===----------------------------------------------------------------------===// +#include <chrono> #include <iostream> #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; }
Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp @@ -7,12 +7,19 @@ // //===----------------------------------------------------------------------===// +#include <chrono> #include <iostream> #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; }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits