99from lldbsuite .test .lldbtest import *
1010import os
1111
12+
1213class TestLocationsAfterRebuild (TestBase ):
1314 # If your test case doesn't stress debug info, then
1415 # set this to true. That way it won't be run once for
@@ -17,15 +18,13 @@ class TestLocationsAfterRebuild(TestBase):
1718
1819 def test_remaining_location_spec (self ):
1920 """If we rebuild a couple of times some of the old locations
20- get removed. Make sure the command-line breakpoint id
21- validator still works correctly."""
22- self .build (dictionary = {"C_SOURCES" : "main.c" , "EXE" : "a.out" })
21+ get removed. Make sure the command-line breakpoint id
22+ validator still works correctly."""
23+ self .build (dictionary = {"C_SOURCES" : "main.c" , "EXE" : "a.out" })
2324
2425 path_to_exe = self .getBuildArtifact ()
25-
26- (target , process , thread , bkpt ) = lldbutil .run_to_name_breakpoint (
27- self , "main"
28- )
26+
27+ (target , process , thread , bkpt ) = lldbutil .run_to_name_breakpoint (self , "main" )
2928
3029 # Let the process continue to exit:
3130 process .Continue ()
@@ -34,21 +33,24 @@ def test_remaining_location_spec(self):
3433
3534 # We have to rebuild twice with changed sources to get
3635 # us to remove the first set of locations:
37- self .build (dictionary = {"C_SOURCES" : "second_main.c" , "EXE" : "a.out" })
36+ self .build (dictionary = {"C_SOURCES" : "second_main.c" , "EXE" : "a.out" })
37+
38+ (target , process , thread , bkpt ) = lldbutil .run_to_breakpoint_do_run (
39+ self , target , bkpt
40+ )
3841
39- (target , process , thread , bkpt ) = lldbutil .run_to_breakpoint_do_run (self , target , bkpt )
40-
4142 # Let the process continue to exit:
4243 process .Continue ()
4344 self .assertEqual (process .GetState (), lldb .eStateExited , "Ran to completion" )
4445
4546 os .remove (path_to_exe )
4647
47- self .build (dictionary = {"C_SOURCES" : "third_main.c" , "EXE" : "a.out" })
48+ self .build (dictionary = {"C_SOURCES" : "third_main.c" , "EXE" : "a.out" })
4849
49- (target , process , thread , bkpt ) = lldbutil .run_to_breakpoint_do_run (self , target , bkpt )
50+ (target , process , thread , bkpt ) = lldbutil .run_to_breakpoint_do_run (
51+ self , target , bkpt
52+ )
5053
5154 bkpt_id = bkpt .GetID ()
5255 loc_string = f"{ bkpt_id } .3"
5356 self .runCmd (f"break disable { loc_string } " )
54-
0 commit comments