]> granicus.if.org Git - graphviz/commitdiff
add ci/mingw-test.sh
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 6 Jan 2022 13:39:29 +0000 (14:39 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 10 Jan 2022 08:35:28 +0000 (09:35 +0100)
ci/mingw-test.sh [new file with mode: 0644]

diff --git a/ci/mingw-test.sh b/ci/mingw-test.sh
new file mode 100644 (file)
index 0000000..5bd04ba
--- /dev/null
@@ -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