Commit 32af4241 authored by Yuke Liao's avatar Yuke Liao Committed by Commit Bot

[lacros] Encapsulates lacros test runner with test_env or xvfb

This CL encapsulates the lacros test runner with either xvfb.py or
test_env.py to be consistent with other Desktop platforms.

Bug: 1104318
Change-Id: I00980225aff8856e5747d15f7e57814fb2e4043c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303169Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789214}
parent 33c10551
...@@ -374,14 +374,28 @@ template("test") { ...@@ -374,14 +374,28 @@ template("test") {
_executable = target_name _executable = target_name
_gen_runner_target = "${target_name}__runner" _gen_runner_target = "${target_name}__runner"
if (defined(invoker.use_xvfb)) {
_use_xvfb = invoker.use_xvfb
} else {
_use_xvfb = false
}
generate_wrapper(_gen_runner_target) { generate_wrapper(_gen_runner_target) {
testonly = true testonly = true
wrapper_script = "$root_build_dir/bin/run_" + _executable wrapper_script = "$root_build_dir/bin/run_" + _executable
executable = "//build/lacros/test_runner.py"
if (_use_xvfb) {
executable = "//testing/xvfb.py"
} else {
executable = "//testing/test_env.py"
}
executable_args = [ executable_args = [
"@WrappedPath(../../build/lacros/test_runner.py)",
"@WrappedPath(./${_executable})", "@WrappedPath(./${_executable})",
"--test-launcher-bot-mode", "--test-launcher-bot-mode",
] ]
if (is_asan) { if (is_asan) {
executable_args += [ "--asan=true" ] executable_args += [ "--asan=true" ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment