Skip to content

Commit

Permalink
Fix some aspects of running debug tests in CI (#8754)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alexcrichton authored Jun 7, 2024
1 parent 59de3a3 commit 890a19e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 890a19e

Please sign in to comment.