Provide support to run cross compiled tests on gitlab CI
On gitlab CI there are pipelines designed for cross compiling dbus. Unfortunally they do not run the contained tests, which would help to see hidden issues.
Running cross compiled tests requires the usage of
wine. A basically working support could be shown at
I used some shell commands similar to what is listed below:
syspath=/usr/i686-w64-mingw32/sysroot/mingw/bin buildpath=~/src/dbus-cmake-cross-x86-wine-build/bin # setup wine prefix wineboot -fi >/dev/null 2>&1 # start x server export DISPLAY=:1 (Xvfb $DISPLAY >/dev/null 2>&1 &) # wait until registry appears while ! test -f ~/.wine/system.reg; do sleep 1 done # get bin dir of mingw installation syspath=$(winepath -w $syspath) # get bin dir of build root buildpath=$(winepath -w $buildpath) # convert back slashes to double backslash addpath=$(echo "$syspath;$buildpath" | sed 's,\\,\\\\\\\\,g') # add local pathes to wine system path sed -i "/^\"PATH\"/ s,\"\$,;$addpath\",g" ~/.wine/system.reg
On gitlab travis CI the pathes for
buildpath need to be adjusted.
- wineboot is not found, although it looks that wine was installed - see https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/2441267