diff --git a/tools/chatgui/tests/test_runtime_deploy.sh b/tools/chatgui/tests/test_runtime_deploy.sh index 4f64b1e2..be16d8e4 100644 --- a/tools/chatgui/tests/test_runtime_deploy.sh +++ b/tools/chatgui/tests/test_runtime_deploy.sh @@ -3,13 +3,17 @@ set -euo pipefail source_dir=$(cd "$(dirname "$0")/.." && pwd) fixture_root=$(mktemp -d) -trap 'rm -rf -- "$fixture_root"' EXIT +trap 'test_rc=$?; if [ "$test_rc" -eq 0 ]; then rm -rf -- "$fixture_root"; else + echo "ERROR: deployment fixture retained: $fixture_root" >&2 + [ -z "${case_dir:-}" ] || tail -60 "$case_dir/output.log" >&2 +fi' EXIT mkdir -p "$fixture_root/commands" cat > "$fixture_root/commands/cmake" <<'SH' #!/bin/bash set -eu if [ "$1" = --build ]; then printf 'DLL Name: Qt%sWidgets.dll\nDLL Name: Qt%sNetwork.dll\n' "$DEPLOY_MAJOR" "$DEPLOY_MAJOR" > "$2/vibechat.exe" + printf 'DLL Name: libgcc_s_seh-1.dll\nDLL Name: libwinpthread-1.dll\nDLL Name: librlottie.dll\nDLL Name: zlib1.dll\nDLL Name: libcrypto-3.dll\n' >> "$2/vibechat.exe" else while [ "$1" != -B ]; do shift; done mkdir -p "$2" @@ -25,6 +29,7 @@ chmod +x "$fixture_root/commands/"* prepare_case() { case_dir="$fixture_root/Qt$1 package"; prefix="$case_dir/ucrt64" mkdir -p "$case_dir/rlottie_build" "$prefix/bin" "$prefix/share/qt$1/plugins/platforms" "$prefix/share/qt$1/plugins/imageformats" + cp "$fixture_root/commands/objdump" "$prefix/bin/objdump" cp "$source_dir/build.sh" "$source_dir/compiler_runtime.sh" "$case_dir/" printf 'DLL Name: KERNEL32.dll\n' > "$case_dir/rlottie_build/librlottie.dll" printf 'fixture\n' > "$case_dir/setup_firewall.bat"