Rename CrOS test configs to be VM agnostic.
Bug: 866062
Change-Id: I8d0acef39ad13a699195d1202490448085ced7e7
Reviewed-on: https://chromium-review.googlesource.com/c/1378914
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617167}
diff --git a/build/chromeos/create_vm_test_script.py b/build/chromeos/create_test_runner_script.py
similarity index 94%
rename from build/chromeos/create_vm_test_script.py
rename to build/chromeos/create_test_runner_script.py
index b6ae3ad..1619457 100755
--- a/build/chromeos/create_vm_test_script.py
+++ b/build/chromeos/create_test_runner_script.py
@@ -5,7 +5,7 @@
# found in the LICENSE file.
"""Creates a script that runs a CrOS VM test by delegating to
-build/chromeos/run_vm_test.py.
+build/chromeos/test_runner.py.
"""
import argparse
@@ -16,7 +16,7 @@
SCRIPT_TEMPLATE = """\
#!/usr/bin/env python
#
-# This file was generated by build/chromeos/create_vm_test_script.py
+# This file was generated by build/chromeos/create_test_runner_script.py
import os
import sys
@@ -60,7 +60,7 @@
return os.path.relpath(path, os.path.dirname(args.script_output_path))
run_test_path = RelativizePathToScript(
- os.path.join(os.path.dirname(__file__), 'run_vm_test.py'))
+ os.path.join(os.path.dirname(__file__), 'test_runner.py'))
vm_test_args = [
'--board', args.board,
diff --git a/build/chromeos/run_vm_test.py b/build/chromeos/test_runner.py
similarity index 100%
rename from build/chromeos/run_vm_test.py
rename to build/chromeos/test_runner.py
diff --git a/build/config/chromeos/rules.gni b/build/config/chromeos/rules.gni
index 802f335..827add6 100644
--- a/build/config/chromeos/rules.gni
+++ b/build/config/chromeos/rules.gni
@@ -36,7 +36,7 @@
# build dir to the VM after launching it.
# runtime_deps_file: Path to file listing runtime deps for the test. If set,
# all files listed will be copied to the VM before testing.
-template("generate_vm_runner_script") {
+template("generate_runner_script") {
_cache_path_prefix =
"//build/cros_cache/chrome-sdk/tarballs/${cros_board}+${cros_sdk_version}"
_vm_image_path = "${_cache_path_prefix}+chromiumos_qemu_image.tar.xz/"
@@ -69,7 +69,7 @@
if (defined(runtime_deps_file)) {
write_runtime_deps = runtime_deps_file
}
- script = "//build/chromeos/create_vm_test_script.py"
+ script = "//build/chromeos/create_test_runner_script.py"
outputs = [
generated_script,
@@ -132,8 +132,8 @@
data += [ "${_cache_path_prefix}+target_toolchain/" ]
}
- # When --test-exe is specified, run_vm_test will push the exe to the VM and
- # execute it. Otherwise it wraps a host-side command and just takes care
+ # When --test-exe is specified, test_runner.py will push the exe to the VM
+ # and execute it. Otherwise it wraps a host-side command and just takes care
# launching & tearing-down the VM.
if (defined(test_exe)) {
args += [
@@ -147,8 +147,8 @@
]
}
} else if (is_tast) {
- # When --tast-tests is specified, run_vm_test will call local_test_runner
- # on the VM to run the set of tests.
+ # When --tast-tests is specified, test_runner.py will call
+ # local_test_runner on the VM to run the set of tests.
args += [
"--suite-name",
target_name,
@@ -174,7 +174,7 @@
assert(defined(invoker.tast_conditional) != defined(invoker.tast_tests),
"Specify one of tast_tests or tast_conditional.")
- generate_vm_runner_script(target_name) {
+ generate_runner_script(target_name) {
testonly = true
if (defined(invoker.tast_conditional)) {
tast_conditional = invoker.tast_conditional
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn
index ed0ddf8e..1bf035b 100644
--- a/chromeos/BUILD.gn
+++ b/chromeos/BUILD.gn
@@ -394,7 +394,7 @@
# https://chromium.googlesource.com/chromium/src/+/master/docs/chromeos_build_instructions.md
# https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md
if (is_cros_chrome_sdk) {
- generate_vm_runner_script("cros_vm_launcher") {
+ generate_runner_script("cros_vm_launcher") {
generated_script = "$root_build_dir/bin/launch_cros_vm"
# Assume every time we build cros_vm_launcher, we also build chrome and
@@ -402,10 +402,10 @@
deploy_chrome = true
}
- # The sanity test's actual binary is baked into the vm image. All we need to
+ # The sanity test's actual binary is baked into the OS image. All we need to
# do is build the test wrapper and build our own browser to push to the VM
# before testing it.
- generate_vm_runner_script("cros_vm_sanity_test") {
+ generate_runner_script("cros_vm_sanity_test") {
testonly = true
test_exe = "cros_vm_sanity_test"
generated_script = "$root_build_dir/bin/run_cros_vm_sanity_test"
diff --git a/testing/test.gni b/testing/test.gni
index a67452b..57dd9bb 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -334,7 +334,7 @@
"$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") +
"/" + get_label_info(target_name, "name") + ".runtime_deps"
- generate_vm_runner_script(_gen_runner_target) {
+ generate_runner_script(_gen_runner_target) {
testonly = true
generated_script = "$root_build_dir/bin/run_" + invoker.target_name
test_exe = invoker.target_name