Skip to content

Commit

Permalink
[bazel] fixup resources and allocate 8:cpus per cw310 tests
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Macrae <[email protected]>
  • Loading branch information
Drew Macrae committed Dec 1, 2022
1 parent 3adbb24 commit b8f044e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
3 changes: 2 additions & 1 deletion rules/opentitan_gdb_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def opentitan_gdb_fpga_cw310_test(
_opentitan_gdb_fpga_cw310_test(
tags = tags + [
"cw310",
"resource:cw310:1", # Prevent FPGA tests from running concurrently.
"resources:cw310:1", # Prevent FPGA tests from running concurrently.
"cpu:8",
"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 @@ -220,7 +220,7 @@ def cw310_params(
]
required_tags = [
"cw310",
"cpu:8", # Because these tests have been exclusive in the past they
"cpu:8", # Because these tests have been exclusive in the past they
# are sensitive to timing and can fail on a busy host
"resources:cw310:1",
]
Expand Down
3 changes: 2 additions & 1 deletion sw/device/silicon_creator/rom/e2e/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3253,7 +3253,8 @@ test_suite(
rom_kind = "Rom",
tags = [
"cw310_rom",
"exclusive",
"resources:cw310:1",
"cpu:8",
"vivado",
] + maybe_skip_in_ci(lc_state_val),
)
Expand Down
42 changes: 21 additions & 21 deletions sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ opentitan_functest(
opentitan_functest(
name = "alert_handler_reverse_ping_in_deep_sleep_test",
srcs = ["alert_handler_reverse_ping_in_deep_sleep_test.c"],
cw310 = cw310_params(
timeout = "moderate",
),
targets = [
# The test requires to run for > 0.2s, thus not recommended for
# Verilator as this will slow down CI too much. It should still
Expand All @@ -186,6 +189,9 @@ opentitan_functest(
"cw310_test_rom",
"dv",
],
verilator = verilator_params(
timeout = "eternal",
),
deps = [
"//hw/top_earlgrey:alert_handler_regs",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand All @@ -207,12 +213,6 @@ opentitan_functest(
"//sw/device/lib/testing:rv_plic_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
cw310 = cw310_params(
timeout = "moderate",
),
verilator = verilator_params(
timeout = "eternal",
),
)

opentitan_functest(
Expand Down Expand Up @@ -463,6 +463,9 @@ opentitan_functest(
opentitan_functest(
name = "chip_power_idle_load",
srcs = ["chip_power_idle_load.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:alert_handler",
Expand All @@ -478,14 +481,14 @@ opentitan_functest(
"//sw/device/lib/testing:pwrmgr_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
verilator = verilator_params(
timeout = "long",
),
)

opentitan_functest(
name = "chip_power_sleep_load",
srcs = ["chip_power_sleep_load.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:alert_handler",
Expand All @@ -503,9 +506,6 @@ opentitan_functest(
"//sw/device/lib/testing:pwrmgr_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
verilator = verilator_params(
timeout = "long",
),
)

cc_library(
Expand Down Expand Up @@ -907,6 +907,9 @@ opentitan_functest(
opentitan_functest(
name = "entropy_src_edn_reqs_test",
srcs = ["entropy_src_edn_reqs_test.c"],
verilator = verilator_params(
timeout = "eternal",
),
deps = [
":otbn_randomness_impl",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand All @@ -932,9 +935,6 @@ opentitan_functest(
"//sw/device/lib/testing:pwrmgr_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
verilator = verilator_params(
timeout = "eternal",
),
)

opentitan_functest(
Expand Down Expand Up @@ -1289,6 +1289,9 @@ opentitan_functest(
opentitan_functest(
name = "otbn_irq_test",
srcs = ["otbn_irq_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/dif:otbn",
Expand All @@ -1301,9 +1304,6 @@ opentitan_functest(
"//sw/device/lib/testing/test_framework:ottf_main",
"//sw/otbn/code-snippets:err_test",
],
verilator = verilator_params(
timeout = "long",
),
)

opentitan_functest(
Expand Down Expand Up @@ -1345,6 +1345,9 @@ cc_library(
opentitan_functest(
name = "otbn_randomness_test",
srcs = ["otbn_randomness_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
":otbn_randomness_impl",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand All @@ -1361,9 +1364,6 @@ opentitan_functest(
"//sw/device/lib/testing/test_framework:check",
"//sw/device/lib/testing/test_framework:ottf_main",
],
verilator = verilator_params(
timeout = "long",
),
)

opentitan_functest(
Expand Down

0 comments on commit b8f044e

Please sign in to comment.