From: Magnus Jacobsson Date: Thu, 6 Jan 2022 13:39:29 +0000 (+0100) Subject: add ci/mingw-test.sh X-Git-Tag: 3.0.0~82^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bccd7d2dd92981afed842637637ee8b8af938aae;p=graphviz add ci/mingw-test.sh --- diff --git a/ci/mingw-test.sh b/ci/mingw-test.sh new file mode 100644 index 000000000..5bd04baeb --- /dev/null +++ b/ci/mingw-test.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail +set -u +set -x + +ci/mingw-install.sh +python3 -m pip install --requirement requirements.txt + +export PATH=$PATH:/c/Git/cmd + +if [ "${build_system}" = "cmake" ]; then + DIR_REL="$(echo build/_CPack_Packages/win64/NSIS/Graphviz-*-win[36][24])" +else + echo "Error: ${build_system} is not yet supported" >&2 + exit 1 +fi + +# we need the absolete path since pytest cd somewhere else + +# we need the Win32 value of the physical directory since somehow the +# symbolic one is not understood in the -L flag. In the -I flag the +# path gets mysteriously translated and works anyway +DIR_WABS="C:/Graphviz" + +# we need the logical value of the directory for the PATH +DIR_LABS="/c/Graphviz" + +# needed to find headers and libs at compile time. Must use absolute +# Windows path for libs (why?) +export CFLAGS="-I$DIR_LABS/include -L$DIR_WABS/lib" + +# needed to find e.g. libgvc.dll at run time. Windows does not use +# LD_LIBRARY_PATH. Must be the logical directory +export PATH="${PATH}:$DIR_LABS/bin" + +python gen_version.py --output GRAPHVIZ_VERSION +export GV_VERSION=$( cat GRAPHVIZ_VERSION ) + +python3 -m pytest --verbose ci/tests.py tests rtest