Fix flakyness in TestWatchLocationWithWatchSet

Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that.

llvm-svn: 251954
This commit is contained in:
Pavel Labath 2015-11-03 18:17:21 +00:00
parent 33e3ed17da
commit 63103c9279
1 changed files with 4 additions and 2 deletions

View File

@ -80,8 +80,10 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase):
endstr = ' = 99')
# Use the '-v' option to do verbose listing of the watchpoint.
# The hit count should now be 1.
# The hit count should now be the same as the number of threads that
# stopped on a watchpoint.
threads = lldbutil.get_stopped_threads(self.process(), lldb.eStopReasonWatchpoint)
self.expect("watchpoint list -v",
substrs = ['hit_count = 1'])
substrs = ['hit_count = %d' % len(threads)])
self.runCmd("thread backtrace all")