blob: f44d7effc5ad561ffa16791a6704c7d00060450b [file] [log] [blame]
'''Module that contains the test TestBreakpointFileLineMultipleRSFilesCpp.'''
from harness.test_base_remote import TestBaseRemote
class TestBreakpointFileLineMultipleRSFilesCpp(TestBaseRemote):
'''Tests setting a breakpoint on one of multiple RS files in an NDK app.'''
def get_bundle_target(self):
'''Return string with name of bundle executable to run.
Returns:
A string containing the name of the binary that this test can be run
with.
'''
return 'CppMultipleRSFiles'
def test_case(self, _):
'''Run the lldb commands that are being tested.
Raises:
TestFail: One of the lldb commands did not provide the expected
output.
'''
self.try_command('language renderscript status',
['Runtime Library discovered',
'Runtime Driver discovered'])
self.try_command('breakpoint set --file first.rs --line 12',
['(pending)'])
self.try_command('process continue',
['stopped',
'librs.first.so`first_kernel',
'at first.rs:12',
"name = 'CppMultipleRSFi'",
'stop reason = breakpoint 1'])
self.try_command('breakpoint set --file second.rs --line 7',
['Breakpoint 2',
'librs.second.so`second_kernel',
'second.rs:7'])
self.try_command('breakpoint list',
['first.rs',
'second.rs',
'resolved = 1',
'first.rs:12',
'second.rs:7'])
self.try_command('breakpoint delete 1',
['1 breakpoints deleted'])
self.try_command('process continue',
['stopped',
'librs.second.so`second_kernel',
'at second.rs:7',
"name = 'CppMultipleRSFi'",
'stop reason = breakpoint 2'])
self.try_command('process status',
['stopped',
'stop reason = breakpoint'])
self.try_command('breakpoint delete 2', ['1 breakpoints deleted'])
self.try_command('process continue',
['exited with status = 0'])