diff options
-rwxr-xr-x | crosperf/download_images_unittest.py | 1 | ||||
-rw-r--r-- | crosperf/suite_runner.py | 19 | ||||
-rwxr-xr-x | crosperf/suite_runner_unittest.py | 3 |
3 files changed, 14 insertions, 9 deletions
diff --git a/crosperf/download_images_unittest.py b/crosperf/download_images_unittest.py index 24a94a37..7a4f3850 100755 --- a/crosperf/download_images_unittest.py +++ b/crosperf/download_images_unittest.py @@ -116,7 +116,6 @@ class ImageDownloaderTestcast(unittest.TestCase): # Verify RunCommand was called twice with correct arguments. self.assertEqual(mock_cmd_exec.RunCommand.call_count, 2) - print(mock_cmd_exec.RunCommand.call_args_list) # Call 1, should have 2 arguments self.assertEqual(len(mock_cmd_exec.RunCommand.call_args_list[0]), 2) actual_arg = mock_cmd_exec.RunCommand.call_args_list[0][0] 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 diff --git a/crosperf/suite_runner_unittest.py b/crosperf/suite_runner_unittest.py index b5a0439f..15847b02 100755 --- a/crosperf/suite_runner_unittest.py +++ b/crosperf/suite_runner_unittest.py @@ -256,8 +256,7 @@ class SuiteRunnerTest(unittest.TestCase): args_dict = mock_chroot_runcmd.call_args_list[0][1] self.assertEqual(len(args_list), 2) self.assertEqual(args_list[0], '/tmp/chromeos') - self.assertEqual(args_list[1], ('/usr/bin/test_that --autotest_dir ' - '~/trunk/src/third_party/autotest/files ' + self.assertEqual(args_list[1], ('/usr/bin/test_that ' '--fast --board=lumpy ' '--iterations=2 lumpy1.cros octane')) self.assertEqual(args_dict['command_terminator'], self.mock_cmd_term) |