Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mobly/base_instrumentation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def _parse_method_block_line(self, instrumentation_block, line):
instrumentation_block.set_key(
_InstrumentationStructurePrefixes.RESULT, line
)
return self._parse_result_line(
return self._parse_result_block_line(
self._transition_instrumentation_block(
instrumentation_block,
new_state=_InstrumentationBlockStates.RESULT,
Expand Down
15 changes: 15 additions & 0 deletions tests/mobly/base_instrumentation_test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,21 @@ def test_run_instrumentation_test_with_runner_setup_crash(self):
instrumentation_output, expected_has_error=True
)

def test_run_instrumentation_test_with_crash_before_status_code(self):
instrumentation_output = """\
INSTRUMENTATION_STATUS: class=com.my.package.test.BasicTest
INSTRUMENTATION_STATUS: test=crashTest
INSTRUMENTATION_RESULT: shortMsg=Process crashed.
INSTRUMENTATION_CODE: 0"""
expected_executed = [
('com.my.package.test.BasicTest#crashTest', signals.TestFailure),
]
self.assert_run_instrumentation_test(
instrumentation_output,
expected_executed=expected_executed,
expected_has_error=True,
)

def test_run_instrumentation_test_with_runner_teardown_crash(self):
instrumentation_output = """\
INSTRUMENTATION_STATUS: numtests=1
Expand Down
Loading