Skip to content

Commit e3fff45

Browse files
committed
[bazel,test] Apply new testopt to tests
Change-Id: Ic05c77684e2d7577bcd328872a230d396035847d Signed-off-by: Yi-Hsuan Deng <[email protected]>
1 parent 2a544d9 commit e3fff45

File tree

26 files changed

+118
-456
lines changed

26 files changed

+118
-456
lines changed

sw/device/lib/testing/test_framework/BUILD

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,6 @@ opentitan_test(
358358
fpga = fpga_params(
359359
flow_control_message = _FLOW_CONTROL_MESSAGE,
360360
test_cmd = """
361-
--exec="transport init"
362-
--exec="fpga load-bitstream {bitstream}"
363-
--exec="bootstrap --clear-uart=true {firmware}"
364361
--exec="console --non-interactive --exit-success=WAIT --exit-failure=PASS|FAIL --flow-control"
365362
console
366363
--flow-control

sw/device/silicon_creator/lib/drivers/BUILD

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,9 +983,6 @@ opentitan_test(
983983
EARLGREY_SILICON_OWNER_ROM_EXT_ENVS,
984984
),
985985
fpga = fpga_params(
986-
test_cmd = """
987-
--bootstrap={firmware}
988-
""",
989986
test_harness = "//sw/host/tests/chip/usb:silicon_creator_harness",
990987
),
991988
silicon = silicon_params(

sw/device/silicon_creator/lib/sigverify/sigverify_tests/BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ opentitan_test(
3131
fpga = fpga_params(
3232
timeout = "moderate",
3333
data = _TEST_VECTORS,
34-
test_cmd = """
35-
--bootstrap={firmware}
36-
""" + _TEST_ARGS,
34+
test_cmd = _TEST_ARGS,
3735
test_harness = "//sw/host/tests/crypto/ecdsa_kat:harness",
3836
),
3937
deps = [

sw/device/silicon_creator/manuf/base/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ opentitan_test(
147147
--test-sram-elf={sram_cp_provision_functest}
148148
""",
149149
test_harness = "//sw/host/tests/manuf/cp_provision_functest",
150+
testopt_bootstrap = "False",
150151
),
151152
)
152153

sw/device/silicon_creator/manuf/lib/BUILD

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ opentitan_test(
214214
changes_otp = True,
215215
otp = "//hw/ip/otp_ctrl/data:img_test_unlocked1",
216216
tags = ["manuf"],
217-
test_cmd = """
218-
--bootstrap={firmware}
219-
""",
220217
test_harness = "//sw/host/tests/manuf/individualize_sw_cfg_functest",
221218
),
222219
deps = [
@@ -278,9 +275,6 @@ opentitan_test(
278275
"lc_dev",
279276
"manuf",
280277
],
281-
test_cmd = """
282-
--bootstrap={firmware}
283-
""",
284278
test_harness = "//sw/host/tests/manuf/personalize_functest",
285279
),
286280
spx_key = {"//sw/device/silicon_creator/rom/keys/fake/spx:spx_keyset": "dev_key_0"},

sw/device/silicon_creator/manuf/tests/BUILD

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ _MANUF_TEST_LOCKED_KEY = None
8888
needs_jtag = True,
8989
otp = "//hw/ip/otp_ctrl/data:img_{}".format(lc_state.lower()),
9090
tags = ["manuf"],
91-
test_cmd = (
92-
"" if (
93-
(lc_state, lc_val) in _TEST_LOCKED_LC_ITEMS
94-
) else "--bootstrap={firmware}"
95-
) + " --initial-lc-state={lc_state}",
91+
test_cmd = "--initial-lc-state={lc_state}",
9692
test_harness = "//sw/host/tests/manuf/manuf_scrap",
93+
testopt_bootstrap = str((lc_state, lc_val) not in _TEST_LOCKED_LC_ITEMS),
9794
),
9895
deps = [
9996
"//sw/device/lib/runtime:log",
@@ -191,6 +188,7 @@ opentitan_test(
191188
tags = ["manuf"],
192189
test_cmd = "--initial-lc-state={lc_state}",
193190
test_harness = "//sw/host/tests/manuf/manuf_cp_yield_test",
191+
testopt_bootstrap = "False",
194192
),
195193
deps = [
196194
"//hw/ip/otp_ctrl/data:otp_ctrl_c_regs",
@@ -262,6 +260,7 @@ cc_library(
262260
tags = ["manuf"],
263261
test_cmd = "--elf={firmware}",
264262
test_harness = "//sw/host/tests/manuf/manuf_sram_program_crc_check",
263+
testopt_bootstrap = "False",
265264
),
266265
kind = "ram",
267266
linker_script = "//sw/device/silicon_creator/manuf/lib:sram_program_linker_script",
@@ -355,7 +354,6 @@ opentitan_binary(
355354
tags = ["manuf"],
356355
target_lc_state = target_lc_state, # will be expanded in test_cmd
357356
test_cmd = """
358-
--bootstrap={firmware}
359357
--target-lc-state={target_lc_state}
360358
--elf={sram_program}
361359
""",
@@ -440,6 +438,7 @@ opentitan_binary(
440438
--elf={sram_program}
441439
""",
442440
test_harness = "//sw/host/tests/manuf/manuf_cp_ast_test_execution",
441+
testopt_bootstrap = "False",
443442
),
444443
deps = [
445444
"//sw/device/lib/runtime:log",
@@ -557,9 +556,6 @@ opentitan_test(
557556
},
558557
fpga = fpga_params(
559558
tags = ["manuf"],
560-
test_cmd = """
561-
--bootstrap={firmware}
562-
""",
563559
test_harness = "//sw/host/tests/manuf/manuf_ujson_msg_size",
564560
),
565561
deps = [
@@ -579,9 +575,6 @@ opentitan_test(
579575
},
580576
fpga = fpga_params(
581577
tags = ["manuf"],
582-
test_cmd = """
583-
--bootstrap={firmware}
584-
""",
585578
test_harness = "//sw/host/tests/manuf/manuf_ujson_msg_padding",
586579
),
587580
deps = [

sw/device/silicon_creator/rom/BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,6 @@ opentitan_test(
554554
# This is a manual test. Run it with:
555555
# --test_output=streamed --copt=-DSTACK_UTILIZATION_CHECK
556556
###########################################################################'"
557-
--exec="transport init"
558-
--exec="fpga load-bitstream {bitstream}"
559-
560557
--exec="no-op --info '### Measuring stack utilization for bootstrap slot A'"
561558
--exec="bootstrap --clear-uart=true --leave-in-bootstrap {good_a}"
562559
--exec="console --non-interactive --exit-success='{stack_usage}' --exit-failure='{exit_failure}'"
@@ -598,6 +595,7 @@ opentitan_test(
598595
--exec="console --non-interactive --exit-success='{stack_usage}' --exit-failure='PASS|FAIL'"
599596
no-op
600597
""",
598+
testopt_bootstrap = "False",
601599
),
602600
exec_env = {
603601
"//hw/top_earlgrey:fpga_cw310_rom_with_fake_keys": None,

sw/device/silicon_creator/rom/e2e/BUILD

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,7 @@ opentitan_test(
458458
exit_success = "min_security_version_rom_ext:0(?s:.*)min_security_version_rom_ext:1(?s:.*)" + MSG_TEMPLATE_BFV.format(hex_digits(CONST.BFV.BOOT_POLICY.ROLLBACK)),
459459
# We clear the bitstream to force any subsequent test to load a
460460
# fresh bitstream and clear all memories (ie: flash-based boot policy).
461-
test_cmd = """
462-
--exec="transport init"
463-
--exec="fpga load-bitstream {bitstream}"
464-
--exec="bootstrap --clear-uart=true {firmware}"
465-
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
466-
--exec="fpga clear-bitstream\"
467-
no-op
468-
""",
461+
testopt_clear_after_test = "True",
469462
),
470463
linker_script = "//sw/device/lib/testing/test_framework:ottf_ld_silicon_creator_slot_a",
471464
deps = [

sw/device/silicon_creator/rom/e2e/bootstrap/BUILD

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ opentitan_test(
7777
changes_otp = True,
7878
needs_jtag = True,
7979
otp = "otp_img_bootstrap_rma",
80-
test_cmd = """
81-
--bootstrap="{firmware}"
82-
""",
8380
test_harness = "//sw/host/tests/rom/e2e_bootstrap_rma",
8481
),
8582
deps = [

sw/device/silicon_creator/rom/e2e/chip_specific_startup/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ package(default_visibility = ["//visibility:public"])
3030
otp = "//sw/device/silicon_creator/rom/e2e/rom_e2e_bootstrap_entry:otp_img_e2e_bootstrap_entry_{}".format(lc_state),
3131
tags = maybe_skip_in_ci(lc_state_val),
3232
test_cmd = """
33-
--bootstrap="{firmware}"
3433
--otp-unprogrammed
3534
""",
3635
test_harness = "//sw/host/tests/rom/e2e_chip_specific_startup",

0 commit comments

Comments
 (0)