mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
5837fbd357
Sets up the Bazel integration test with the new integration rule. This commit is separate from the other changes because it required some additional work. i.e. The test has moved from `integration/bazel` to `integration/<..>/bazel` where `<..>` is a new Bazel package defining the integration test. This is necessary because we could not declare the integration test within the `BUILD.bazel` file actually being part of the nested bazel workspace. In those cases we can just define it at a higher-level and use integration test `working_dir` attribute. PR Close #44238
24 lines
1023 B
Python
24 lines
1023 B
Python
load("//integration:index.bzl", "ng_integration_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ng_integration_test(
|
|
name = "bazel_ngtsc_plugin_test",
|
|
srcs = glob(["bazel_ngtsc_plugin/**"]),
|
|
environment = {
|
|
# Setup a HOME directory so that Bazelisk can work, both Linux/macOS and Windows variants
|
|
# are configured to provide a fake home directory so that Bazelisk can download Bazel.
|
|
"HOME": "<TMP>",
|
|
"LOCALAPPDATA": "<TMP>",
|
|
},
|
|
tags = [
|
|
# Bazel-in-bazel tests are resource intensive and should not be over-parallelized
|
|
# as they will compete for the resources of other parallel tests slowing
|
|
# everything down. Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag.
|
|
"cpu:3",
|
|
],
|
|
# Nested bazel workspace tests need to be declared at a higher-level because the test
|
|
# cannot be wired up within the `BUILD.bazel` file as part of the actual test workspace.
|
|
working_dir = "bazel_ngtsc_plugin/",
|
|
)
|