aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhizhouy <zhizhouy@google.com>2020-05-27 20:54:08 -0700
committerZhizhou Yang <zhizhouy@google.com>2020-05-28 05:38:00 +0000
commit4c3b93f5df7fabf3770e41e101d92d8e026c8ead (patch)
tree4c27fc6dc7632c1082aa236f1eea292500c172a3
parentc5bfbeeb8f3b84258129e5fe423fe47bbb0db4b5 (diff)
downloadtoolchain-utils-4c3b93f5df7fabf3770e41e101d92d8e026c8ead.tar.gz
crosperf: fix compress dir for tast tests
Tast results directory has different name from test_that results, causing a bug when compress_results option is on. This CL fixes it. BUG=chromium:1079048 TEST=Tested with tast and test_that benchmarks in crosperf Change-Id: I06e6615c748aeeb2fc4576f4e1bcfdad93526962 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2218541 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com>
-rw-r--r--crosperf/results_cache.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index 08a5d1bb..0dd60ea1 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -118,7 +118,12 @@ class Result(object):
def CompressResultsTo(self, dest_dir):
tarball = os.path.join(self.results_dir, RESULTS_TARBALL)
- results_dir = self.FindFilesInResultsDir('-name results').split('\n')[0]
+ # Test_that runs hold all output under TEST_NAME_HASHTAG/results/,
+ # while tast runs hold output under TEST_NAME/.
+ # Both ensure to be unique.
+ result_dir_name = self.test_name if self.suite == 'tast' else 'results'
+ results_dir = self.FindFilesInResultsDir(
+ '-name %s' % result_dir_name).split('\n')[0]
self.CreateTarball(results_dir, tarball)
self.CopyFilesTo(dest_dir, [tarball])
if results_dir: