ci: Shutdown wineserver whenever CI script exits

Before: CI times out when a wine task fails.
After:  Wine tasks exit properly when they fail.
This commit is contained in:
Tim Ruffing 2023-01-28 09:22:24 +01:00
parent 9a5a611a21
commit e4330341bd

View File

@ -34,6 +34,8 @@ print_environment
# This speeds up jobs with many invocations of wine (e.g., ./configure with MSVC) tremendously.
case "$WRAPPER_CMD" in
*wine*)
# Make sure to shutdown wineserver whenever we exit.
trap "wineserver -k || true" EXIT INT HUP
# This is apparently only reliable when we run a dummy command such as "hh.exe" afterwards.
wineserver -p && wine hh.exe
;;
@ -111,9 +113,6 @@ then
make precomp
fi
# Shutdown wineserver again
wineserver -k || true
# Check that no repo files have been modified by the build.
# (This fails for example if the precomp files need to be updated in the repo.)
git diff --exit-code