test-msys2.sh: Copy built DLLs into each directory with tests

This works around a Meson bug where a system-wide installed copy of
GLib can incorrectly get used in preference to the just-built copy
(see https://github.com/mesonbuild/meson/issues/12330).

In principle some of these are unnecessary (for example libgio-2.0-0.dll
only needs to be in gio/tests/ and girepository/tests/) but it's simpler
to copy each DLL to each tests directory.

Fixes: c428d6e6 "ci: Build and tar the platform specific documentation"
Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3262
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2024-02-14 13:50:45 +00:00
parent b974fa4e50
commit d9ac253649

View File

@ -55,6 +55,23 @@ if [[ "$CFLAGS" == *"-coverage"* ]]; then
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
fi
# FIXME: Workaround for https://github.com/mesonbuild/meson/issues/12330
for tests in \
gio/tests \
girepository/tests \
glib/tests \
gmodule/tests \
gobject/tests \
gthread/tests \
; do
cp _build/glib/libglib-2.0-0.dll "_build/$tests/"
cp _build/gmodule/libgmodule-2.0-0.dll "_build/$tests/"
cp _build/gobject/libgobject-2.0-0.dll "_build/$tests/"
cp _build/gthread/libgthread-2.0-0.dll "_build/$tests/"
cp _build/gio/libgio-2.0-0.dll "_build/$tests/"
cp _build/girepository/libgirepository-2.0-0.dll "_build/$tests/"
done
meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}"
meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--setup=unstable_tests --suite=failing --suite=flaky || true
@ -72,4 +89,4 @@ fi
# can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md
mkdir -p _reference/
mv _build/docs/reference/glib/glib-win32/ _reference/glib-win32/
mv _build/docs/reference/gio/gio-win32/ _reference/gio-win32/
mv _build/docs/reference/gio/gio-win32/ _reference/gio-win32/