ci: skip -ldl on MinGW links; widen the gdb backtrace to the plugin test binaries
- oakffmpeg-link forwards pkg-config --static --libs verbatim; FFmpeg's .pc files can list -ldl via external deps, and MinGW has no libdl - suites_test segfaults on the Linux runner too; run both plugin test binaries under gdb on test failure
This commit is contained in:
@@ -207,14 +207,16 @@ jobs:
|
||||
run: xvfb-run -a -s "-screen 0 1920x1080x24" cargo test --workspace --locked
|
||||
|
||||
# A crashing (SIGSEGV) test gives no Rust backtrace; rerun the
|
||||
# crashing binary under gdb to capture the native stack.
|
||||
# plugin test binaries under gdb to capture the native stack.
|
||||
- name: Backtrace on test failure (Linux)
|
||||
if: failure()
|
||||
run: |
|
||||
sudo apt-get install -y gdb
|
||||
BIN=$(ls -t target/debug/deps/node_e2e_test-* | grep -v '\.d$' | head -1)
|
||||
xvfb-run -a gdb -batch -ex run -ex bt -- "$BIN" \
|
||||
plugin_renders_constant_frame_end_to_end --exact --nocapture
|
||||
for name in node_e2e_test suites_test; do
|
||||
BIN=$(ls -t target/debug/deps/$name-* | grep -v '\.d$' | head -1)
|
||||
[ -n "$BIN" ] || continue
|
||||
xvfb-run -a gdb -batch -ex run -ex bt -- "$BIN" --nocapture || true
|
||||
done
|
||||
|
||||
- name: Test (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
|
||||
@@ -102,6 +102,13 @@ fn main() {
|
||||
if let Some(path) = token.strip_prefix("-L") {
|
||||
println!("cargo:rustc-link-search=native={path}");
|
||||
} else if let Some(lib) = token.strip_prefix("-l") {
|
||||
// MinGW has no libdl: FFmpeg's .pc files can still list it via
|
||||
// an external dep's Requires.private; the Unix dlopen surface
|
||||
// the FFmpeg build uses has no Windows references to satisfy.
|
||||
#[cfg(target_os = "windows")]
|
||||
if lib == "dl" {
|
||||
continue;
|
||||
}
|
||||
// System libs (m, z, bz2, iconv, ...) and externals alike; the
|
||||
// linker picks .a or .dylib per -L search order.
|
||||
println!("cargo:rustc-link-lib={lib}");
|
||||
|
||||
Reference in New Issue
Block a user