diff options
author | Yunlian Jiang <yunlian@google.com> | 2013-03-25 14:02:29 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-27 15:49:32 -0700 |
commit | b8b76e2cf876caf2de12e06951c7ab80333a1799 (patch) | |
tree | 02c08d95c7db0e4deedff9ef7d21b6ab02770e27 /crosperf/results_cache.py | |
parent | 9d1db65f60b01e8e33ec995cceb5069e440ebdd8 (diff) | |
download | toolchain-utils-b8b76e2cf876caf2de12e06951c7ab80333a1799.tar.gz |
Remove unrelated /tmp from crosperf report.
This bug happens when we move the invocation of generate_test_report
into chroot. The source dir did not change accordingly, so it cannot
remove the /tmp stuff anymore.
BUG=None
TEST=The /tmp/... stuff is removed on both cache and non cached case.
Change-Id: I29dac68eecf0ff1d265f2a3f004627c30962e228
Reviewed-on: https://gerrit-int.chromium.org/34407
Reviewed-by: asharif <asharif@google.com>
Commit-Queue: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'crosperf/results_cache.py')
-rw-r--r-- | crosperf/results_cache.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py index 0357275d..96889fd1 100644 --- a/crosperf/results_cache.py +++ b/crosperf/results_cache.py @@ -1,6 +1,8 @@ #!/usr/bin/python -# -# Copyright 2011 Google Inc. All Rights Reserved. + +# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. import getpass import glob @@ -69,11 +71,13 @@ class Result(object): command, return_output=True) keyvals_dict = {} + tmp_dir_in_chroot = misc.GetInsideChrootPath(self._chromeos_root, + self._temp_dir) for line in out.splitlines(): tokens = re.split("=|,", line) key = tokens[-2] - if key.startswith(self.results_dir): - key = key[len(self.results_dir) + 1:] + if key.startswith(tmp_dir_in_chroot): + key = key[len(tmp_dir_in_chroot) + 1:] value = tokens[-1] keyvals_dict[key] = value |