From d9ac2536496eb33d502fc30383555b08c2b04e15 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 14 Feb 2024 13:50:45 +0000 Subject: [PATCH] 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 --- .gitlab-ci/test-msys2.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index b5a6d9adb..9f6657f34 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -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/ \ No newline at end of file +mv _build/docs/reference/gio/gio-win32/ _reference/gio-win32/