File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,11 @@ interface TestRunnerService {
347347 * Test case log files produced by the test.
348348 */
349349 val testCaseArtifacts: Map <TestIdentifier , List <TestCaseArtifact >>
350+
351+ /* *
352+ * Crash report if module encountered a crash
353+ */
354+ val crashReport: ResultFileResource ?
350355 }
351356
352357 data class TestCaseArtifact (
Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ internal class TestRunnerServiceImpl internal constructor(
214214 " LOGCAT"
215215 )
216216 }
217+ } else if (fileName.contains(CRASH_REPORT_FILE_NAME )) {
218+ getTestResultFiles(visitor).crashReport = ResultFileResourceImpl (visitor)
217219 }
218220 }
219221 // remove this if block when b/299975596 is fixed
@@ -342,6 +344,7 @@ internal class TestRunnerServiceImpl internal constructor(
342344 private const val TEST_RESULT_XML_PREFIX = " test_result_"
343345 private const val TEST_RESULT_XML_SUFFIX = " .xml"
344346 private const val INSTRUMENTATION_RESULTS_FILE_NAME = " instrumentation.results"
347+ private const val CRASH_REPORT_FILE_NAME = " crash"
345348 }
346349 class ResultFileResourceImpl (
347350 private val blobVisitor : BlobVisitor
@@ -372,6 +375,8 @@ internal class TestRunnerServiceImpl internal constructor(
372375 override val xmlResults: List <TestRunnerService .ResultFileResource > = xmlResultBlobs
373376 override val testCaseArtifacts: Map <TestRunnerService .TestIdentifier , List <TestRunnerService .TestCaseArtifact >> = testCaseArtifactBlobs
374377 override val deviceRun: DeviceRun = DeviceRun .create(fullDeviceId)
378+ override var crashReport: TestRunnerService .ResultFileResource ? = null
379+ internal set
375380
376381 internal fun addXmlResult (resultFileResource : TestRunnerService .ResultFileResource ) {
377382 xmlResultBlobs.add(resultFileResource)
You can’t perform that action at this time.
0 commit comments