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
15 class AproposWithProcessTestCase(TestBase):
17 mydir = TestBase.compute_mydir(__file__)
20 # Call super's setUp().
22 # Find the line number to break inside main().
23 self.line = line_number('main.cpp', '// break here')
25 def test_apropos_with_process(self):
26 """Test that apropos env doesn't crash trying to touch the process plugin commmand."""
28 exe = os.path.join(os.getcwd(), "a.out")
29 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
31 # Break in main() aftre the variables are assigned values.
32 lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
34 self.runCmd("run", RUN_SUCCEEDED)
36 # The stop reason of the thread should be breakpoint.
37 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
38 substrs = ['stopped', 'stop reason = breakpoint'])
40 # The breakpoint should have a hit count of 1.
41 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
42 substrs = [' resolved, hit count = 1'])
44 self.runCmd('apropos env')