diff --git a/sw/device/silicon_creator/rom/e2e/empty_test.c b/sw/device/silicon_creator/rom/e2e/empty_test.c index 04292d227dc4e..a77a7d5515f16 100644 --- a/sw/device/silicon_creator/rom/e2e/empty_test.c +++ b/sw/device/silicon_creator/rom/e2e/empty_test.c @@ -4,11 +4,11 @@ #include -#include "sw/device/lib/runtime/log.h" #include "sw/device/lib/testing/test_framework/ottf_main.h" #include "sw/device/silicon_creator/lib/manifest_def.h" #ifdef EMPTY_TEST_MSG +#include "sw/device/lib/runtime/log.h" #include "sw/device/silicon_creator/lib/drivers/lifecycle.h" #include "sw/device/silicon_creator/lib/drivers/otp.h" #include "sw/device/silicon_creator/lib/sigverify/spx_verify.h" diff --git a/sw/device/silicon_creator/rom/e2e/sigverify_key_validity/BUILD b/sw/device/silicon_creator/rom/e2e/sigverify_key_validity/BUILD index 246e6f7061dd9..785c1a8584eb4 100644 --- a/sw/device/silicon_creator/rom/e2e/sigverify_key_validity/BUILD +++ b/sw/device/silicon_creator/rom/e2e/sigverify_key_validity/BUILD @@ -3,9 +3,9 @@ # SPDX-License-Identifier: Apache-2.0 load( - "//rules:opentitan_test.bzl", + "//rules/opentitan:defs.bzl", "cw310_params", - "opentitan_functest", + "opentitan_test", ) load( "//rules:const.bzl", @@ -75,30 +75,13 @@ otp_json( ] [ - bitstream_splice( - name = "bitstream_sigverify_key_validity_{}".format( - lc_state, - ), - src = "//hw/bitstream:rom_with_fake_keys", - data = ":otp_img_sigverify_key_validity_{}".format( - lc_state, - ), - meminfo = "//hw/bitstream:otp_mmi", - tags = maybe_skip_in_ci(lc_state_val), - update_usr_access = True, - visibility = ["//visibility:private"], - ) - for lc_state, lc_state_val in get_lc_items() -] - -[ - opentitan_functest( + opentitan_test( name = "sigverify_key_validity_{}_{}".format( lc_state, key.rsa.name, ), + srcs = ["//sw/device/silicon_creator/rom/e2e:empty_test"], cw310 = cw310_params( - bitstream = ":bitstream_sigverify_key_validity_{}".format(lc_state), exit_failure = MSG_PASS if lc_state_val != CONST.LCV.TEST_UNLOCKED0 else MSG_TEMPLATE_BFV_LCV.format( hex_digits(CONST.BFV.SIGVERIFY.BAD_RSA_KEY), hex_digits(lc_state_val), @@ -107,12 +90,15 @@ otp_json( hex_digits(CONST.BFV.SIGVERIFY.BAD_RSA_KEY), hex_digits(lc_state_val), ) if lc_state_val != CONST.LCV.TEST_UNLOCKED0 else MSG_PASS, + otp = ":otp_img_sigverify_key_validity_{}".format(lc_state), tags = maybe_skip_in_ci(lc_state_val), ), - key_struct = key, - ot_flash_binary = "//sw/device/silicon_creator/rom/e2e:empty_test_slot_a", - targets = [ - "cw310_rom_with_fake_keys", + exec_env = { + "//hw/top_earlgrey:fpga_cw310_rom_with_fake_keys": None, + }, + rsa_key = {key.rsa.label: key.rsa.name}, + deps = [ + "//sw/device/lib/testing/test_framework:ottf_main", ], ) for lc_state, lc_state_val in get_lc_items()