aboutsummaryrefslogtreecommitdiff
path: root/crosperf/suite_runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r--crosperf/suite_runner.py34
1 files changed, 27 insertions, 7 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py
index 79ace20d..17e1ad73 100644
--- a/crosperf/suite_runner.py
+++ b/crosperf/suite_runner.py
@@ -17,7 +17,7 @@ import time
from cros_utils import command_executer
TEST_THAT_PATH = '/usr/bin/test_that'
-# TODO: Need to check whether Skylab is installed and set up correctly.
+TAST_PATH = '/usr/bin/tast'
SKYLAB_PATH = '/usr/local/bin/skylab'
GS_UTIL = 'src/chromium/depot_tools/gsutil.py'
AUTOTEST_DIR = '/mnt/host/source/src/third_party/autotest/files'
@@ -78,8 +78,11 @@ class SuiteRunner(object):
if label.skylab:
ret_tup = self.Skylab_Run(label, benchmark, test_args, profiler_args)
else:
- ret_tup = self.Test_That_Run(machine_name, label, benchmark, test_args,
- profiler_args)
+ if benchmark.suite == 'tast':
+ ret_tup = self.Tast_Run(machine_name, label, benchmark)
+ else:
+ ret_tup = self.Test_That_Run(machine_name, label, benchmark,
+ test_args, profiler_args)
if ret_tup[0] != 0:
self.logger.LogOutput('benchmark %s failed. Retries left: %s' %
(benchmark.name, benchmark.retries - i))
@@ -127,6 +130,24 @@ class SuiteRunner(object):
return args_list
+ # TODO(zhizhouy): Currently do not support passing arguments or running
+ # customized tast tests, as we do not have such requirements.
+ def Tast_Run(self, machine, label, benchmark):
+ # Remove existing tast results
+ command = 'rm -rf /usr/local/autotest/results/*'
+ self._ce.CrosRunCommand(
+ command, machine=machine, chromeos_root=label.chromeos_root)
+
+ command = ' '.join(
+ [TAST_PATH, 'run', '-build=False', machine, benchmark.test_name])
+
+ if self.log_level != 'verbose':
+ self.logger.LogOutput('Running test.')
+ self.logger.LogOutput('CMD: %s' % command)
+
+ return self._ce.ChrootRunCommandWOutput(
+ label.chromeos_root, command, command_terminator=self._ct)
+
def Test_That_Run(self, machine, label, benchmark, test_args, profiler_args):
"""Run the test_that test.."""
@@ -166,11 +187,10 @@ class SuiteRunner(object):
# process namespace and we can kill process created easily by their
# process group.
chrome_root_options = ('--no-ns-pid '
- '--chrome_root={} --chrome_root_mount={} '
+ '--chrome_root={0} --chrome_root_mount={1} '
'FEATURES="-usersandbox" '
- 'CHROME_ROOT={}'.format(label.chrome_src,
- CHROME_MOUNT_DIR,
- CHROME_MOUNT_DIR))
+ 'CHROME_ROOT={1}'.format(label.chrome_src,
+ CHROME_MOUNT_DIR))
if self.log_level != 'verbose':
self.logger.LogOutput('Running test.')