diff options
author | Manoj Gupta <manojgupta@google.com> | 2018-05-02 14:10:35 -0700 |
---|---|---|
committer | Manoj Gupta <manojgupta@chromium.org> | 2018-05-03 01:47:15 +0000 |
commit | 065ab805e293e91904ba4d061cb66c6dfe657dad (patch) | |
tree | c2b84dfac0196eaddfdaeeecd495999348b4d13b /crosperf/suite_runner.py | |
parent | 40372e338bf8ff9bd39103fd4076f8e664338b66 (diff) | |
download | toolchain-utils-065ab805e293e91904ba4d061cb66c6dfe657dad.tar.gz |
crosperf: Ignore error when disabling turbo.
Some boards do not permit changing tubo config
/sys/devices/system/cpu/intel_pstate/no_turbo
Ignore the error for now so that tests can continue.
Also update some formatting suggested by tc_format.
BUG=chromium:839125
TEST=No more errors.
Change-Id: I3a709ea2638d783dd3a3ebf70eba8a6dbc4df53a
Reviewed-on: https://chromium-review.googlesource.com/1040773
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r-- | crosperf/suite_runner.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index c7acea85..6a7fa6bd 100644 --- a/crosperf/suite_runner.py +++ b/crosperf/suite_runner.py @@ -74,8 +74,8 @@ class SuiteRunner(object): self.logger.LogOutput('benchmark %s failed. Retries left: %s' % (benchmark.name, benchmark.retries - i)) elif i > 0: - self.logger.LogOutput('benchmark %s succeded after %s retries' % - (benchmark.name, i)) + self.logger.LogOutput( + 'benchmark %s succeded after %s retries' % (benchmark.name, i)) break else: self.logger.LogOutput( @@ -90,7 +90,7 @@ class SuiteRunner(object): 'set -e && ' # Disable Turbo in Intel pstate driver 'if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then ' - 'echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; fi; ' + '(echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo || true); fi; ' # Set governor to performance for each cpu 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' 'cd $f; ' @@ -125,15 +125,15 @@ class SuiteRunner(object): FILE = '/usr/local/telemetry/src/tools/perf/page_sets/page_cycler_story.py' ret = self._ce.CrosRunCommand( 'ls ' + FILE, machine=machine_name, chromeos_root=chromeos_root) - self.logger.LogFatalIf(ret, 'Could not find {} on machine: {}'.format( - FILE, machine_name)) + self.logger.LogFatalIf( + ret, 'Could not find {} on machine: {}'.format(FILE, machine_name)) if not ret: sed_command = 'sed -i "s/_TTI_WAIT_TIME = 10/_TTI_WAIT_TIME = 2/g" ' ret = self._ce.CrosRunCommand( sed_command + FILE, machine=machine_name, chromeos_root=chromeos_root) - self.logger.LogFatalIf(ret, 'Could not modify {} on machine: {}'.format( - FILE, machine_name)) + self.logger.LogFatalIf( + ret, 'Could not modify {} on machine: {}'.format(FILE, machine_name)) def RestartUI(self, machine_name, chromeos_root): command = 'stop ui; sleep 5; start ui' |