diff options
author | Julien Desprez <jdesprez@google.com> | 2020-07-16 23:19:26 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-16 23:19:26 +0000 |
commit | 4ee09d50952165d692c1edd55722c0331bd753d6 (patch) | |
tree | 148528a045ca8df330a14ddaf99bd29801d75232 | |
parent | de78e6fc1158fd5092b0f3c46609f9a31db2dc87 (diff) | |
parent | 07166e8d1b48ed051d2113c4937d766c96a00730 (diff) | |
download | suite_harness-4ee09d50952165d692c1edd55722c0331bd753d6.tar.gz |
Move test_result.html under the include_html flag am: 72091179f2 am: 07166e8d1b
Original change: https://android-review.googlesource.com/c/platform/test/suite_harness/+/1364076
Change-Id: I4ef3846d8cf11042e8aca4d48976f5ceac21d304
2 files changed, 10 insertions, 6 deletions
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java index 94459f7e..a7a94c47 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java @@ -382,20 +382,22 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor getMergedTestRunResults(), getPrimaryBuildInfo().getBuildAttributes().get(BUILD_FINGERPRINT)); - File report = createReport(reportFile); - if (report != null) { - CLog.i("Viewable report: %s", report.getAbsolutePath()); - } + File report = null; File failureReport = null; if (mIncludeHtml) { - // Create the html report before the zip file. + // Create the html reports before the zip file. + report = createReport(reportFile); failureReport = createFailureReport(reportFile); } File zippedResults = zipResults(mResultDir); if (!mIncludeHtml) { - // Create failure report after zip file so extra data is not uploaded + // Create html reports after zip file so extra data is not uploaded + report = createReport(reportFile); failureReport = createFailureReport(reportFile); } + if (report != null) { + CLog.i("Viewable report: %s", report.getAbsolutePath()); + } try { if (failureReport.exists()) { CLog.i("Test Result: %s", failureReport.getCanonicalPath()); diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java index 192f5a73..6687c5f4 100644 --- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java +++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java @@ -169,6 +169,8 @@ public class CertificationSuiteResultReporterTest { assertTrue(content.contains("suite_name=\"VTS\"")); assertTrue(content.contains("suite_variant=\"CTS_ON_GSI\"")); assertTrue(content.contains("suite_version=\"version\"")); + // Ensure html is created + assertTrue(new File(mBuildHelper.getResultDir(), "test_result.html").exists()); } /** |