]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
CI: Only configure wine as an exe_wrapper if we are going to run tests
authorSimon McVittie <smcv@collabora.com>
Tue, 1 Oct 2024 13:28:56 +0000 (14:28 +0100)
committerSimon McVittie <smcv@collabora.com>
Tue, 1 Oct 2024 13:40:26 +0000 (14:40 +0100)
This choice of exe_wrapper doesn't appear to work on Debian 12, causing
a build failure while checking that the output of the C++ compiler is
executable.

Another advantage of this is that if we're not running the test suite,
we can do a more traditional cross-build where running host-architecture
executables is impossible, which doubles as a way to prove that this
still works.

Signed-off-by: Simon McVittie <smcv@collabora.com>
maint/i686-w64-mingw32.txt
maint/wine-exe-wrapper.txt [new file with mode: 0644]
maint/x86_64-w64-mingw32.txt
tools/ci-build.sh

index dd92c458bfbadee6a5514e87575898560ec8aaef..2c2f9497215bc016649974fe7794d5c053881e8b 100644 (file)
@@ -9,7 +9,6 @@ ar = '/usr/bin/i686-w64-mingw32-ar'
 strip = '/usr/bin/i686-w64-mingw32-strip'
 pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
 windres = '/usr/bin/i686-w64-mingw32-windres'
-exe_wrapper = ['xvfb-run', '-a', 'wine']
 ld = '/usr/bin/i686-w64-mingw32-ld'
 cmake = '/usr/bin/cmake'
 
diff --git a/maint/wine-exe-wrapper.txt b/maint/wine-exe-wrapper.txt
new file mode 100644 (file)
index 0000000..c593e2e
--- /dev/null
@@ -0,0 +1,6 @@
+# Copyright 2018-2020 Meson contributors
+# Copyright 2024 Collabora Ltd.
+# SPDX-License-Identifier: Apache-2.0
+
+[binaries]
+exe_wrapper = ['xvfb-run', '-a', 'wine']
index 80c3607add6a349e736923e1bc508201815210cb..b98a2e497a41ecfa281c843ca2791366d94fdbf1 100644 (file)
@@ -9,7 +9,6 @@ ar = '/usr/bin/x86_64-w64-mingw32-ar'
 strip = '/usr/bin/x86_64-w64-mingw32-strip'
 pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
 windres = '/usr/bin/x86_64-w64-mingw32-windres'
-exe_wrapper = ['xvfb-run', '-a', 'wine']
 ld = '/usr/bin/x86_64-w64-mingw32-ld'
 cmake = '/usr/bin/cmake'
 
index ea6b35a26ebbae894e4fb2bcb58ad4b0045a6546..c971415cde051eb5b25794d427133c5858a1bae5 100755 (executable)
@@ -291,7 +291,7 @@ case "$ci_buildsys" in
         export DBUS_TEST_MALLOC_FAILURES=0
 
         meson_setup=
-        cross_file=
+        cross_files=()
 
         # openSUSE has convenience wrappers that run Meson with appropriate
         # cross options
@@ -306,7 +306,12 @@ case "$ci_buildsys" in
 
         case "$ci_host" in
             (*-w64-mingw32)
-                cross_file="${srcdir}/maint/${ci_host}.txt"
+                cross_files=("${cross_files[@]}" "${srcdir}/maint/${ci_host}.txt")
+
+                if [ "$ci_test" = yes ]; then
+                    cross_files=("${cross_files[@]}" "${srcdir}/maint/wine-exe-wrapper.txt")
+                fi
+
                 # openSUSE's wrappers are designed for building predictable
                 # RPM packages, so they set --auto-features=enabled -
                 # but that includes some things that make no sense on
@@ -432,9 +437,9 @@ case "$ci_buildsys" in
         if [ -z "$meson_setup" ] || ! command -v "$meson_setup" >/dev/null; then
             meson_setup="meson setup"
 
-            if [ -n "$cross_file" ]; then
+            for cross_file in "${cross_files[@]}"; do
                 set -- --cross-file="$cross_file" "$@"
-            fi
+            done
         fi
 
         # We assume this when we set LD_LIBRARY_PATH for as-installed