diff options
author | Yunlian Jiang <yunlian@chromium.org> | 2018-03-07 14:11:05 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-07 18:39:34 -0800 |
commit | 26dca7ed90b0d3bf5aed9aeb5af79fd7733bc087 (patch) | |
tree | 7eb0ae1d992e0ee4c579b428cd55f1c2fe2013be /crosperf/suite_runner.py | |
parent | 527fcb39b1ebc18058ebf564c683ab92a0b63767 (diff) | |
download | toolchain-utils-26dca7ed90b0d3bf5aed9aeb5af79fd7733bc087.tar.gz |
crosperf: restart ui instead of reboot machine.
We restart machine to try to get a clean state for testing. But
the restart beeping is anoying, as a workaround, we restart ui
instead of reboot machine.
BUG=None
TEST=unittest passes.
Change-Id: Idec234e86af661213206f954eda1fb0967c74024
Reviewed-on: https://chromium-review.googlesource.com/953864
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r-- | crosperf/suite_runner.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index bd27f282..c7acea85 100644 --- a/crosperf/suite_runner.py +++ b/crosperf/suite_runner.py @@ -135,13 +135,10 @@ class SuiteRunner(object): 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 +155,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 != '': |