diff options
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r-- | crosperf/suite_runner.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index bd27f282..b4b669a8 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,10 @@ 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; ' + ' if grep -q 0 /sys/devices/system/cpu/intel_pstate/no_turbo; then ' + ' echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; ' + ' fi; ' + 'fi; ' # Set governor to performance for each cpu 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' 'cd $f; ' @@ -125,23 +128,20 @@ 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 RebootMachine(self, machine_name, chromeos_root): - command = 'reboot && exit' + def RestartUI(self, machine_name, chromeos_root): + command = 'stop ui; sleep 5; start ui' self._ce.CrosRunCommand( command, machine=machine_name, chromeos_root=chromeos_root) - time.sleep(60) - # Whenever we reboot the machine, we need to restore the governor settings. - self.PinGovernorExecutionFrequencies(machine_name, chromeos_root) def Test_That_Run(self, machine, label, benchmark, test_args, profiler_args): """Run the test_that test..""" @@ -158,7 +158,8 @@ class SuiteRunner(object): # We do this because some tests leave the machine in weird states. # Rebooting between iterations has proven to help with this. - self.RebootMachine(machine, label.chromeos_root) + # But the beep is anoying, we will try restart ui. + self.RestartUI(machine, label.chromeos_root) autotest_dir = AUTOTEST_DIR if label.autotest_path != '': |