bisect-kit: run autotest with prebuilt
This is partial revert of 99e808f9 because
1. autotest should be installed in order to handle private tests
2. 'building chromeos' is too heavy for prebuilt bisections
The revised behavior:
- Switch chromeos source code (but not build) to corresponding version
when diagnose start.
- Still use autotest prebuilt packages when bisect non-chromeos-localbuild.
BUG=b:138363895
TEST=run end-to-end diagnose_cros_autotest.py manually
Change-Id: I7efee55de4f39964709ad051638d7a893449b3a2
Reviewed-on: https://chromium-review.googlesource.com/1745793
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@google.com>
diff --git a/eval_cros_autotest.py b/eval_cros_autotest.py
index 06ea93c..c32b0d2 100755
--- a/eval_cros_autotest.py
+++ b/eval_cros_autotest.py
@@ -183,18 +183,23 @@
Returns:
path of test result (outside chroot)
"""
+ prebuilt_autotest_dir = os.path.join(cros_util.chromeos_root_inside_chroot,
+ cros_util.prebuilt_autotest_dir)
# Set results dir inside source tree, so it's easier to access them outside
# chroot.
results_dir = os.path.join(cros_util.chromeos_root_inside_chroot,
'tmp/autotest_results_tmp')
- test_that_bin = '/usr/bin/test_that'
+ if opts.prebuilt:
+ test_that_bin = os.path.join(prebuilt_autotest_dir,
+ 'site_utils/test_that.py')
+ else:
+ test_that_bin = '/usr/bin/test_that'
cmd = [
test_that_bin, opts.dut, opts.test_name, '--debug', '--results_dir',
results_dir
]
if opts.prebuilt:
- cmd += ['--autotest_dir', '/mnt/host/source/src/third_party/autotest/files']
- cmd.append('--no-quickmerge')
+ cmd += ['--autotest_dir', prebuilt_autotest_dir]
args = get_additional_test_args(opts.test_name)
if opts.args: