2 Test that apropos env doesn't crash trying to touch the process plugin commmand
5 from __future__ import print_function
12 from lldbsuite.test.lldbtest import *
13 import lldbsuite.test.lldbutil as lldbutil
16 class AproposWithProcessTestCase(TestBase):
18 mydir = TestBase.compute_mydir(__file__)
21 # Call super's setUp().
23 # Find the line number to break inside main().
24 self.line = line_number('main.cpp', '// break here')
26 def test_apropos_with_process(self):
27 """Test that apropos env doesn't crash trying to touch the process plugin commmand."""
29 exe = os.path.join(os.getcwd(), "a.out")
30 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
32 # Break in main() aftre the variables are assigned values.
33 lldbutil.run_break_set_by_file_and_line(
34 self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
36 self.runCmd("run", RUN_SUCCEEDED)
38 # The stop reason of the thread should be breakpoint.
39 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
40 substrs=['stopped', 'stop reason = breakpoint'])
42 # The breakpoint should have a hit count of 1.
43 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
44 substrs=[' resolved, hit count = 1'])
46 self.runCmd('apropos env')