|
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", |
@@ -383,16 +391,23 @@ LARGE_SPECS = { |
383 | 391 | ] |
384 | 392 |
|
385 | 393 | [ |
386 | | - jasmine_node_test( |
387 | | - name = "build_angular_" + spec + "_test", |
388 | | - size = LARGE_SPECS[spec].get("size", "medium"), |
389 | | - flaky = LARGE_SPECS[spec].get("flaky", False), |
390 | | - shard_count = LARGE_SPECS[spec].get("shards", 2), |
391 | | - # These tests are resource intensive and should not be over-parallized as they will |
392 | | - # compete for the resources of other parallel tests slowing everything down. |
393 | | - # Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag. |
394 | | - tags = ["cpu:2"] + LARGE_SPECS[spec].get("tags", []), |
395 | | - deps = [":build_angular_" + spec + "_test_lib"], |
| 394 | + [ |
| 395 | + jasmine_node_test( |
| 396 | + name = "build_angular_" + spec + "_test_" + toolchain_name, |
| 397 | + size = LARGE_SPECS[spec].get("size", "medium"), |
| 398 | + flaky = LARGE_SPECS[spec].get("flaky", False), |
| 399 | + shard_count = LARGE_SPECS[spec].get("shards", 2), |
| 400 | + # These tests are resource intensive and should not be over-parallized as they will |
| 401 | + # compete for the resources of other parallel tests slowing everything down. |
| 402 | + # Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag. |
| 403 | + tags = ["cpu:2"] + LARGE_SPECS[spec].get("tags", []), |
| 404 | + toolchain = toolchain, |
| 405 | + deps = [":build_angular_" + spec + "_test_lib"], |
| 406 | + ) |
| 407 | + for spec in LARGE_SPECS |
| 408 | + ] |
| 409 | + for toolchain_name, toolchain in zip( |
| 410 | + TOOLCHAINS_NAMES, |
| 411 | + TOOLCHAINS_VERSIONS, |
396 | 412 | ) |
397 | | - for spec in LARGE_SPECS |
398 | 413 | ] |
0 commit comments