CI: bundle MinGW runtime DLLs and print test output on failure

- ci: copy libstdc++-6/libgcc_s_seh-1/libwinpthread-1 next to the built binaries so the tests can load libagent.dll; without them every test failed with a load error on the runner

- tests: run-tests.ps1 now prints a failing test's captured output, so a failure is diagnosable even though the test program exits 0
This commit is contained in:
xiaozhou233 committed 2026-10-16 12:38:05 +08:00
1 parent 9aebf29bb5
commit 08fe3a8815
2 files changed
+24 -2

No files matched your search

+15 -2
View File
@@ -37,11 +37,24 @@ jobs:
- name: Build
shell: msys2 {0}
run: cmake --build build
run: |
cmake --build build
# Bundle the MinGW runtime DLLs next to the binaries. The integration
# tests load libagent.dll through System.load, and its dependencies
# (libstdc++/libgcc/libwinpthread) are otherwise only found via PATH.
# copy-bin.bat then carries them into tests/resources as well.
for dll in libstdc++-6.dll libgcc_s_seh-1.dll libwinpthread-1.dll; do
if [ -f "/mingw64/bin/$dll" ]; then
cp -f "/mingw64/bin/$dll" build/bin/
fi
done
echo "--- build/bin ---"
ls -1 build/bin
- name: Run integration tests
shell: pwsh
run: |
# libagent.dll links against the MinGW runtime DLLs from this toolchain.
# Prepend the toolchain bin as a fallback for the runtime DLLs.
$env:PATH = "C:\msys64\mingw64\bin;$env:PATH"
./tests/run-tests.ps1