Commit df3725d4 authored by Yuke Liao's avatar Yuke Liao Committed by Chromium LUCI CQ

Reland "Lacros: create lacros tast test targets"

This is a reland of e2f3b551

Original change's description:
> Lacros: create lacros tast test targets
>
> This CL creates gn targets for lacros tast tests, and the main
> motivation is to run lacros tast tests on Chromium CI.
>
> Bug: 1158590
> Change-Id: I783779c3386a39743b8227367189b0b87832b9dc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606188
> Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Ben Pastene <bpastene@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/master@{#844127}

Bug: 1158590
Change-Id: I4baefe78970cb928476166875b519738be0c9f79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633073
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844818}
parent eaa20263
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/chromeos/rules.gni")
import("//build/config/chromeos/ui_mode.gni") import("//build/config/chromeos/ui_mode.gni")
import("//build/config/linux/gtk/gtk.gni") import("//build/config/linux/gtk/gtk.gni")
import("//build/lacros/lacros_resource_sizes.gni") import("//build/lacros/lacros_resource_sizes.gni")
...@@ -30,3 +31,45 @@ component("lacros") { ...@@ -30,3 +31,45 @@ component("lacros") {
lacros_resource_sizes_test("resource_sizes_lacros_chrome") { lacros_resource_sizes_test("resource_sizes_lacros_chrome") {
data_deps = [ "//chrome:chrome" ] data_deps = [ "//chrome:chrome" ]
} }
# "cros_board" set in the GN args defines the board used to build lacros-chrome,
# while the "override_board" here defines the board on which to test the built
# binary, for more details, please refer to the "generate_runner_script"
# template in //build/config/chromeos/rules.gni.
template("lacros_tast_test_helper") {
forward_variables_from(invoker, [ "override_board" ])
assert(defined(override_board), "override_board is required")
lacros_tast_test(target_name) {
# TODO(crbug.com/1158590): use --attr-expr instead of hard-coding the tests.
tast_tests = [
"lacros.AudioPlay",
"lacros.AppLauncherLaunch",
"lacros.Basic",
"lacros.ShelfLaunch",
]
}
}
# On Chromium CI, only a very limited number of boards are supported:
# amd64-generic, eve, kevin etc, so just hard-coding them for simplicity.
if (is_chromeos_device) {
_boards = [ cros_board ] + string_split(cros_boards, ":") +
string_split(cros_boards_with_qemu_images, ":")
foreach(b1,
[
"amd64-generic",
"eve",
]) {
# To avoid duplicate definition of the targets.
matched = false
foreach(b2, _boards) {
if (!matched && b1 == b2) {
b1_underscore = string_replace(b1, "-", "_")
lacros_tast_test_helper("lacros_tast_tests_${b1_underscore}") {
override_board = b1
}
matched = 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