diff options
author | Manoj Gupta <manojgupta@google.com> | 2017-01-09 14:52:51 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-01-11 20:56:45 +0000 |
commit | 3fb928efb42405e386da41adf4bd674e86e23022 (patch) | |
tree | 85fd5ec00c0f5131fef3e3b696a2b314f04007ea /crosperf/suite_runner.py | |
parent | 70204447c3c103508f1b8e58d59a9b8f165e1c21 (diff) | |
download | toolchain-utils-3fb928efb42405e386da41adf4bd674e86e23022.tar.gz |
Fix test_that run for non-telemtry tests.
Do not add the autotest_dir argument to test_that
for non-telemetry tests.
Minor change: Remove a leftover print from download_images
unit test.
BUG: chromium:679001
TEST:crosperf unit tests
Change-Id: I0ff5365902af40097b61ae57d7c0d8d43ea308a8
Reviewed-on: https://chromium-review.googlesource.com/426073
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r-- | crosperf/suite_runner.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index 744d8bb3..796c1e4d 100644 --- a/crosperf/suite_runner.py +++ b/crosperf/suite_runner.py @@ -13,6 +13,7 @@ from cros_utils import command_executer import test_flag TEST_THAT_PATH = '/usr/bin/test_that' +AUTOTEST_DIR = '~/trunk/src/third_party/autotest/files' CHROME_MOUNT_DIR = '/tmp/chrome_root' @@ -173,13 +174,19 @@ class SuiteRunner(object): # Rebooting between iterations has proven to help with this. self.RebootMachine(machine, label.chromeos_root) - autotest_dir = '~/trunk/src/third_party/autotest/files' + autotest_dir = AUTOTEST_DIR if label.autotest_path != '': autotest_dir = label.autotest_path - command = ( - ('%s --autotest_dir %s --fast ' - '%s %s %s') % - (TEST_THAT_PATH, autotest_dir, options, machine, benchmark.test_name)) + + autotest_dir_arg = '--autotest_dir %s' % autotest_dir + # For non-telemetry tests, specify an autotest directory only if the + # specified directory is different from default (crosbug.com/679001). + if autotest_dir == AUTOTEST_DIR: + autotest_dir_arg = '' + + command = (('%s %s --fast ' + '%s %s %s') % (TEST_THAT_PATH, autotest_dir_arg, options, + machine, benchmark.test_name)) if self.log_level != 'verbose': self.logger.LogOutput('Running test.') self.logger.LogOutput('CMD: %s' % command) @@ -211,7 +218,7 @@ class SuiteRunner(object): # 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' + autotest_dir_arg = '--autotest_dir %s' % AUTOTEST_DIR if label.autotest_path != '': autotest_dir_arg = '--autotest_dir %s' % label.autotest_path |