Skip to content

Commit 9cbfed4

Browse files
committed
debug: add gdb backtrace on segfault for embed tests
1 parent b2572ae commit 9cbfed4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,8 @@ jobs:
226226
echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ env.clang }}/bin/llvm-config" >> $GITHUB_ENV
227227
228228
- name: Test with embed feature
229-
run: cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast
229+
run: |
230+
sudo sysctl -w kernel.core_pattern='core.%e.%p'
231+
ulimit -c unlimited
232+
cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast || \
233+
(for core in core.*; do [ -f "$core" ] && gdb -batch -ex "thread apply all bt" target/release/deps/sapi_tests-* "$core"; done; exit 1)

0 commit comments

Comments
 (0)