From 890a19e91e45b1ca13646a2c060d56350ee55341 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 6 Jun 2024 23:16:39 -0500 Subject: [PATCH] Fix some aspects of running debug tests in CI (#8754) * Fix some aspects of running debug tests in CI This commit fixes the filter used to run tests in CI to include all debug with a broader filter to include the whole `debug` module of tests. This fixes a mistake where recent tests added weren't running in CI. This then additionally adds a `run-dwarf` filter in CI to run these tests on any changes to filenames containing "debug" in the name. * Test out the marker to run dwarf tests in CI prtest:debug --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f3df368eca0..80f97930232c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -196,6 +196,7 @@ jobs: test-nightly: ${{ steps.calculate.outputs.test-nightly }} audit: ${{ steps.calculate.outputs.audit }} preview1-adapter: ${{ steps.calculate.outputs.preview1-adapter }} + run-dwarf: ${{ steps.calculate.outputs.run-dwarf }} steps: - uses: actions/checkout@v4 - id: calculate @@ -216,6 +217,8 @@ jobs: run_full=true elif grep -q 'prtest:full' commits.log; then run_full=true + elif grep -q 'prtest:debug' commits.log; then + echo run-dwarf=true >> $GITHUB_OUTPUT fi if grep -q crates.c-api names.log; then echo test-capi=true >> $GITHUB_OUTPUT @@ -235,6 +238,9 @@ jobs: if grep -q component-adapter names.log; then echo preview1-adapter=true >> $GITHUB_OUTPUT fi + if grep -q debug names.log; then + echo run-dwarf=true >> $GITHUB_OUTPUT + fi fi matrix="$(node ./ci/build-test-matrix.js ./commits.log ./names.log $run_full)" echo "test-matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT @@ -249,6 +255,7 @@ jobs: echo test-nightly=true >> $GITHUB_OUTPUT echo audit=true >> $GITHUB_OUTPUT echo preview1-adapter=true >> $GITHUB_OUTPUT + echo run-dwarf=true >> $GITHUB_OUTPUT fi # Build all documentation of Wasmtime, including the C API documentation, @@ -739,7 +746,7 @@ jobs: # Test debug (DWARF) related functionality. test_debug_dwarf: needs: determine - if: needs.determine.outputs.run-full + if: needs.determine.outputs.run-dwarf name: Test DWARF debugging runs-on: 'ubuntu-latest' steps: @@ -753,7 +760,7 @@ jobs: # workaround for https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1972855 sudo mkdir -p /usr/lib/local/lib/python3.10/dist-packages/lldb sudo ln -s /usr/lib/llvm-15/lib/python3.10/dist-packages/lldb/* /usr/lib/python3/dist-packages/lldb/ - cargo test test_debug_dwarf -- --ignored --test-threads 1 + cargo test --test all -- --ignored --test-threads 1 debug:: env: RUST_BACKTRACE: 1 LLDB: lldb-15 # override default version, 14