aboutsummaryrefslogtreecommitdiff
path: root/crosperf
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2015-07-24 14:04:12 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-25 01:22:31 +0000
commit146058f65658cdf073cba7d5d12b082b2eb854f2 (patch)
tree2e7dfdb605cf68e6985057d0278041d9a85995a4 /crosperf
parent25c94f1849f617166781903637099d962673c60a (diff)
downloadtoolchain-utils-146058f65658cdf073cba7d5d12b082b2eb854f2.tar.gz
Remove temp file that breaks telemetry.
Occasionally after running Telemetry, it will leave behind a file in /tmp of your chroot (/tmp/telemetry@<machine_name>), which will cause any later attempt to run telemetry on that machine to fail, until the file is removed. This CL checks for such a file, and if found deletes it, before attempting to run the telemetry tests. BUG=chromium:513875 TEST=Tested in my chroot with & without such a file. Change-Id: I3e0a3000a1614f46f9312abddf77fd48b25334da Reviewed-on: https://chrome-internal-review.googlesource.com/223812 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf')
-rw-r--r--crosperf/suite_runner.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py
index 6a2a1297..f9a2ba30 100644
--- a/crosperf/suite_runner.py
+++ b/crosperf/suite_runner.py
@@ -159,6 +159,14 @@ class SuiteRunner(object):
True,
self._ct)
+ def RemoveTelemetryTempFile (self, machine, chromeos_root):
+ filename = "telemetry@%s" % machine
+ fullname = os.path.join (chromeos_root,
+ "chroot",
+ "tmp",
+ filename)
+ if os.path.exists(fullname):
+ os.remove(fullname)
def Telemetry_Crosperf_Run (self, machine, label, benchmark, test_args,
profiler_args):
@@ -166,6 +174,11 @@ class SuiteRunner(object):
self._logger.LogFatal("Cannot find chrome src dir to"
" run telemetry: %s" % label.chrome_src)
+ # Check for and remove temporary file that may have been left by
+ # previous telemetry runs (and which might prevent this run from
+ # working).
+ self.RemoveTelemetryTempFile (machine, label.chromeos_root)
+
# For telemetry runs, we can use the autotest copy from the source
# location. No need to have one under /build/<board>.
autotest_dir_arg = '--autotest_dir ~/trunk/src/third_party/autotest/files'
@@ -224,6 +237,11 @@ class SuiteRunner(object):
if profiler_args:
self._logger.LogFatal("Telemetry does not support the perf profiler.")
+ # Check for and remove temporary file that may have been left by
+ # previous telemetry runs (and which might prevent this run from
+ # working).
+ self.RemoveTelemetryTempFile (machine, label.chromeos_root)
+
rsa_key = os.path.join(label.chromeos_root,
"src/scripts/mod_for_test_scripts/ssh_keys/testing_rsa")