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.

Signed-off-by: Drew Macrae <drewmacrae@google.com>
  • Loading branch information
Drew Macrae committed Dec 22, 2022
1 parent aaad9d3 commit 4fec2ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@ coverage:coverage_clang --repo_env=BAZEL_LLVM_COV=/usr/bin/llvm-cov
# cached previously. See https://bazel.build/configure/coverage?hl=en#remote-execution
coverage:coverage_clang --nocache_test_results

# Verilator is built for 4 cores and can time out if bazel is running more
# than 1 test per four cores.
# Until we get the built-in tag "cpu:4" to work for verilator tests, we can run
# 1 test per 4 cores to avoid verilator performance falloff and timeouts we'd
# otherwise see on machines with fewer than 40 cores.
test --local_test_jobs=HOST_CPUS*0.25
# 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 4fec2ff

Please sign in to comment.