|
6 | 6 | load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") |
7 | 7 | load("//tools:defaults.bzl", "pkg_npm", "ts_library") |
8 | 8 | load("//tools:ts_json_schema.bzl", "ts_json_schema") |
| 9 | +load("//tools:toolchain_info.bzl", "TOOLCHAINS_NAMES", "TOOLCHAINS_VERSIONS") |
9 | 10 | load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package") |
10 | 11 |
|
11 | 12 | licenses(["notice"]) # MIT |
@@ -209,10 +210,17 @@ ts_library( |
209 | 210 | ], |
210 | 211 | ) |
211 | 212 |
|
212 | | -jasmine_node_test( |
213 | | - name = "build_angular_test", |
214 | | - srcs = [":build_angular_test_lib"], |
215 | | -) |
| 213 | +[ |
| 214 | + jasmine_node_test( |
| 215 | + name = "build_angular_test_" + toolchain_name, |
| 216 | + srcs = [":build_angular_test_lib"], |
| 217 | + toolchain = toolchain, |
| 218 | + ) |
| 219 | + for toolchain_name, toolchain in zip( |
| 220 | + TOOLCHAINS_NAMES, |
| 221 | + TOOLCHAINS_VERSIONS, |
| 222 | + ) |
| 223 | +] |
216 | 224 |
|
217 | 225 | genrule( |
218 | 226 | name = "license", |
@@ -384,16 +392,23 @@ LARGE_SPECS = { |
384 | 392 | ] |
385 | 393 |
|
386 | 394 | [ |
387 | | - jasmine_node_test( |
388 | | - name = "build_angular_" + spec + "_test", |
389 | | - size = LARGE_SPECS[spec].get("size", "medium"), |
390 | | - flaky = LARGE_SPECS[spec].get("flaky", False), |
391 | | - shard_count = LARGE_SPECS[spec].get("shards", 2), |
392 | | - # These tests are resource intensive and should not be over-parallized as they will |
393 | | - # compete for the resources of other parallel tests slowing everything down. |
394 | | - # Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag. |
395 | | - tags = ["cpu:2"] + LARGE_SPECS[spec].get("tags", []), |
396 | | - deps = [":build_angular_" + spec + "_test_lib"], |
| 395 | + [ |
| 396 | + jasmine_node_test( |
| 397 | + name = "build_angular_" + spec + "_test_" + toolchain_name, |
| 398 | + size = LARGE_SPECS[spec].get("size", "medium"), |
| 399 | + flaky = LARGE_SPECS[spec].get("flaky", False), |
| 400 | + shard_count = LARGE_SPECS[spec].get("shards", 2), |
| 401 | + # These tests are resource intensive and should not be over-parallized as they will |
| 402 | + # compete for the resources of other parallel tests slowing everything down. |
| 403 | + # Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag. |
| 404 | + tags = ["cpu:2"] + LARGE_SPECS[spec].get("tags", []), |
| 405 | + toolchain = toolchain, |
| 406 | + deps = [":build_angular_" + spec + "_test_lib"], |
| 407 | + ) |
| 408 | + for spec in LARGE_SPECS |
| 409 | + ] |
| 410 | + for toolchain_name, toolchain in zip( |
| 411 | + TOOLCHAINS_NAMES, |
| 412 | + TOOLCHAINS_VERSIONS, |
397 | 413 | ) |
398 | | - for spec in LARGE_SPECS |
399 | 414 | ] |
0 commit comments