Skip to content

Commit

Permalink
[bazel] Allocate CW310s based on extra resources
Browse files Browse the repository at this point in the history
WIP requires custom bazel binary. Don't merge until bazel is updated to
reflect upstream changes.

Removes the external tag in preference for a custom resource as handled
by bazelbuild/bazel#16785

Signed-off-by: Drew Macrae <[email protected]>
  • Loading branch information
Drew Macrae committed Dec 23, 2022
1 parent 5603629 commit a2232f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ test:local_test_jobs_per_cpus --local_test_jobs=HOST_CPUS*0.22
# Empirically 72 cores can support 16 simultaneous tests, but not 17. Setting
# this will ignore tags like "cpu:5"

# Allow bazel to allocate tests to 1 cw310 board.
test --local_extra_resources=cw310=1

# We have verilator tests that take more than an hour to complete
test --test_timeout=60,300,1500,7200

Expand Down
2 changes: 1 addition & 1 deletion rules/opentitan_gdb_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def opentitan_gdb_fpga_cw310_test(
_opentitan_gdb_fpga_cw310_test(
tags = tags + [
"cw310",
"exclusive", # Prevent FPGA tests from running concurrently.
"resources:cw310:1", # Prevent FPGA tests from running concurrently.
"jtag",
],
opentitantool_cw310_uarts = select({
Expand Down
2 changes: 1 addition & 1 deletion rules/opentitan_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def cw310_params(
]
required_tags = [
"cw310",
"exclusive",
"resources:cw310:1",
]
kwargs.update(
args = default_args + args,
Expand Down
1 change: 0 additions & 1 deletion sw/device/silicon_creator/rom/e2e/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3455,7 +3455,6 @@ test_suite(
rom_kind = "Rom",
tags = [
"cw310_rom",
"exclusive",
"vivado",
] + maybe_skip_in_ci(lc_state_val),
)
Expand Down

0 comments on commit a2232f3

Please sign in to comment.