From fe01d2b6d1b41986888e4c258055a83e7ee5b63b Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 16 Jan 2025 14:36:42 +0000 Subject: [PATCH] [ci] Test `uart_smoketest` with QEMU env in CI Signed-off-by: James Wainwright --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ sw/device/tests/BUILD | 5 +++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b41edaf0f2790..54f2e9c663b44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -702,3 +702,28 @@ jobs: - name: Check for unrunnable tests run: ./ci/scripts/check-unrunnable-tests.sh continue-on-error: true + + execute_rom_qemu_tests: + name: QEMU ROM Tests + needs: quick_lint + runs-on: ubuntu-22.04-vivado + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for bitstream cache to work. + - name: Prepare environment + uses: ./.github/actions/prepare-env + with: + service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}' + - name: Execute QEMU tests + run: | + ./bazelisk.sh test \ + --run_under=//ci/scripts:run_test \ + --define DISABLED_VERILATOR_BUILD=true \ + --nokeep_going \ + --test_timeout_filters=short,moderate \ + --test_output=all \ + --build_tests_only \ + --flaky_test_attempts=2 \ + --test_tag_filters=qemu \ + //... diff --git a/sw/device/tests/BUILD b/sw/device/tests/BUILD index af608f3ce5e0e..720b481983568 100644 --- a/sw/device/tests/BUILD +++ b/sw/device/tests/BUILD @@ -26,6 +26,7 @@ load( "fpga_params", "opentitan_binary", "opentitan_test", + "qemu_params", "silicon_params", "verilator_params", ) @@ -4256,8 +4257,12 @@ opentitan_test( EARLGREY_CW340_TEST_ENVS, { "//hw/top_earlgrey:silicon_creator": None, + "//hw/top_earlgrey:sim_qemu_rom_with_fake_keys": None, }, ), + qemu = qemu_params( + test_harness = "//third_party/qemu:qemu-system-riscv32", + ), deps = [ "//hw/top_earlgrey/sw/autogen:top_earlgrey", "//sw/device/lib/arch:device",