From 68fd178d69954e34a6dc1704cd840b683f47538b Mon Sep 17 00:00:00 2001 From: Douglas Reis Date: Mon, 18 Dec 2023 15:41:18 +0000 Subject: [PATCH] [sival, spi_dev] Move tpm test out of sim_dv folder Signed-off-by: Douglas Reis --- hw/top_earlgrey/dv/chip_sim_cfg.hjson | 2 +- sw/device/tests/BUILD | 34 +++++++++++++++++++ sw/device/tests/sim_dv/BUILD | 20 ----------- .../{sim_dv => }/spi_device_tpm_tx_rx_test.c | 0 4 files changed, 35 insertions(+), 21 deletions(-) rename sw/device/tests/{sim_dv => }/spi_device_tpm_tx_rx_test.c (100%) diff --git a/hw/top_earlgrey/dv/chip_sim_cfg.hjson b/hw/top_earlgrey/dv/chip_sim_cfg.hjson index f4748333e6ba0e..2fe9f3215c4ed8 100644 --- a/hw/top_earlgrey/dv/chip_sim_cfg.hjson +++ b/hw/top_earlgrey/dv/chip_sim_cfg.hjson @@ -694,7 +694,7 @@ { name: chip_sw_spi_device_tpm uvm_test_seq: chip_sw_spi_device_tpm_vseq - sw_images: ["//sw/device/tests/sim_dv:spi_device_tpm_tx_rx_test:1:new_rules"] + sw_images: ["//sw/device/tests:spi_device_tpm_tx_rx_test:1:new_rules"] en_run_modes: ["sw_test_mode_test_rom"] } { diff --git a/sw/device/tests/BUILD b/sw/device/tests/BUILD index 75edb5f9c6ba33..fa2e191d55c92c 100644 --- a/sw/device/tests/BUILD +++ b/sw/device/tests/BUILD @@ -2535,6 +2535,40 @@ opentitan_test( ], ) +opentitan_test( + name = "spi_device_tpm_tx_rx_test", + srcs = ["spi_device_tpm_tx_rx_test.c"], + cw310 = new_cw310_params( + # This test requires the spi full duplex on the hyperdebug board. + tags = ["manual"] + test_cmd = """ + --bitstream="{bitstream}" + --bootstrap="{firmware}" + "{firmware:elf}" + """, + test_harness = "//sw/host/tests/chip/spi_device_tpm_test", + ), + exec_env = { + "//hw/top_earlgrey:fpga_cw310_sival": None, + "//hw/top_earlgrey:fpga_cw310_test_rom": None, + "//hw/top_earlgrey:sim_dv": None, + }, + deps = [ + "//hw/top_earlgrey/sw/autogen:top_earlgrey", + "//sw/device/lib/arch:device", + "//sw/device/lib/base:mmio", + "//sw/device/lib/dif:pinmux", + "//sw/device/lib/dif:rv_plic", + "//sw/device/lib/dif:spi_device", + "//sw/device/lib/runtime:hart", + "//sw/device/lib/runtime:irq", + "//sw/device/lib/runtime:log", + "//sw/device/lib/testing:isr_testutils", + "//sw/device/lib/testing/test_framework:ottf_main", + "//sw/device/lib/testing/test_framework:status", + ], +) + cc_library( name = "spi_host_flash_test_impl", srcs = ["spi_host_flash_test_impl.c"], diff --git a/sw/device/tests/sim_dv/BUILD b/sw/device/tests/sim_dv/BUILD index df32d66287d63b..3af1701da50e7d 100644 --- a/sw/device/tests/sim_dv/BUILD +++ b/sw/device/tests/sim_dv/BUILD @@ -671,26 +671,6 @@ opentitan_test( ], ) -opentitan_test( - name = "spi_device_tpm_tx_rx_test", - srcs = ["spi_device_tpm_tx_rx_test.c"], - exec_env = {"//hw/top_earlgrey:sim_dv": None}, - deps = [ - "//hw/top_earlgrey/sw/autogen:top_earlgrey", - "//sw/device/lib/arch:device", - "//sw/device/lib/base:mmio", - "//sw/device/lib/dif:pinmux", - "//sw/device/lib/dif:rv_plic", - "//sw/device/lib/dif:spi_device", - "//sw/device/lib/runtime:hart", - "//sw/device/lib/runtime:irq", - "//sw/device/lib/runtime:log", - "//sw/device/lib/testing:isr_testutils", - "//sw/device/lib/testing/test_framework:ottf_main", - "//sw/device/lib/testing/test_framework:status", - ], -) - opentitan_test( name = "spi_host_tx_rx_test", srcs = ["spi_host_tx_rx_test.c"], diff --git a/sw/device/tests/sim_dv/spi_device_tpm_tx_rx_test.c b/sw/device/tests/spi_device_tpm_tx_rx_test.c similarity index 100% rename from sw/device/tests/sim_dv/spi_device_tpm_tx_rx_test.c rename to sw/device/tests/spi_device_tpm_tx_rx_test.c