Lacros: Differentiate linux-lacros and dut-lacros in testing config
Before this CL, when building dut-lacros, it uses the linux-lacros's
test runner and dependencies, which is wrong, so this CL fixes the
problem to use execute the chromeos device code paths.
Bug: 1195415
Change-Id: I06fd195f74c735e55407fc1541d0faf5fccf015e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2829933
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#873127}
diff --git a/testing/test.gni b/testing/test.gni
index f517357..a8c369e 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -6,6 +6,7 @@
# TEST SETUP
# ==============================================================================
+import("//build/config/chromeos/args.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build_overrides/build.gni")
@@ -29,7 +30,7 @@
import("//build/config/fuchsia/generate_runner_scripts.gni")
import("//build/config/fuchsia/package.gni")
import("//third_party/fuchsia-sdk/sdk/build/cmc.gni")
-} else if (is_chromeos_ash) {
+} else if (is_chromeos_ash || (is_chromeos_lacros && is_chromeos_device)) {
import("//build/config/chromeos/rules.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/util/generate_wrapper.gni")
@@ -479,10 +480,11 @@
data_deps += [ ":${invoker.target_name}__rts_filters" ]
}
}
- } else if (is_chromeos_ash && cros_board != "") {
+ } else if ((is_chromeos_ash || (is_chromeos_lacros && is_chromeos_device)) &&
+ cros_board != "") {
assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
- # Building for a cros board (ie: not linux-chromeos).
+ # Building for a cros board (ie: not linux-chromeos or linux-lacros).
_gen_runner_target = "${target_name}__runner"
_runtime_deps_file =
@@ -532,7 +534,7 @@
data_deps += [ ":${invoker.target_name}__rts_filters" ]
}
}
- } else if (chromeos_is_browser_only) {
+ } else if (is_chromeos_lacros && !is_chromeos_device) {
_runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
_executable = target_name
_gen_runner_target = "${target_name}__runner"