diff options
author | Kazuhiro Inaba <kinaba@google.com> | 2024-04-25 01:58:13 +0000 |
---|---|---|
committer | Kazuhiro Inaba <kinaba@google.com> | 2024-04-25 01:58:13 +0000 |
commit | cefe7b7ee24ba7cda323b0ca169a91598c6cecfd (patch) | |
tree | 70c961cf9edafac421b4f1b84214e3212acd4576 | |
parent | baa5975893de4d935c5d888f09cc2f409d6b5f35 (diff) | |
download | cts-cefe7b7ee24ba7cda323b0ca169a91598c6cecfd.tar.gz |
CtsVerifier: consistent directory and archive name in report export.
In rare case when the two lines are across the second boundary,
the directory name and the zip file name becomes different and
cause a slight annoyance. The CL is to ensure both always use
the same string.
Bug: 333985854
Test: Save test results from CtsVerifier
Change-Id: I8f0cada68e5f1747d001e606849ad332b05d79ee
-rw-r--r-- | apps/CtsVerifier/src/com/android/cts/verifier/ReportExporter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/ReportExporter.java b/apps/CtsVerifier/src/com/android/cts/verifier/ReportExporter.java index baa19519c26..f603baa858f 100644 --- a/apps/CtsVerifier/src/com/android/cts/verifier/ReportExporter.java +++ b/apps/CtsVerifier/src/com/android/cts/verifier/ReportExporter.java @@ -138,15 +138,16 @@ public class ReportExporter extends AsyncTask<Void, Void, String> { verifierReportsDir.mkdirs(); String suiteName = Version.getMetadata(mContext, SUITE_NAME_METADATA_KEY); + String reportName = getReportName(suiteName); // create a temporary directory for this particular report - File tempDir = new File(verifierReportsDir, getReportName(suiteName)); + File tempDir = new File(verifierReportsDir, reportName); tempDir.mkdirs(); // Pull in any ReportLogs copyReportFiles(tempDir); // create a File object for a report ZIP file - File reportZipFile = new File(verifierReportsDir, getReportName(suiteName) + ZIP_EXTENSION); + File reportZipFile = new File(verifierReportsDir, reportName + ZIP_EXTENSION); try { // Serialize the report |