summaryrefslogtreecommitdiff
path: root/test/windows/mingw
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-07-16 09:39:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-07-16 09:39:06 +0200
commitc832963ebe7939393f1108d31aa569723190177c (patch)
treefb978ada240abbca55a0bf17283795b044615cea /test/windows/mingw
parent0f61d97cb8e971308d91cfe305d20f1f33190dc0 (diff)
Add Windows test scripts (VC and MinGW)
Diffstat (limited to 'test/windows/mingw')
-rwxr-xr-xtest/windows/mingw/build62
-rwxr-xr-xtest/windows/mingw/unpack3
2 files changed, 65 insertions, 0 deletions
diff --git a/test/windows/mingw/build b/test/windows/mingw/build
new file mode 100755
index 0000000..b309908
--- /dev/null
+++ b/test/windows/mingw/build
@@ -0,0 +1,62 @@
+#! /usr/bin/env bash
+
+# Build XSD examples for MinGW.
+#
+# -rebuild
+# -test
+#
+trap 'exit 1' ERR
+
+function error ()
+{
+ echo "$*" 1>&2
+}
+
+# Xerces-C++ installation directory (not build directory).
+#
+XERCESROOT=/c/projects/xerces-mingw32
+
+CPPFLAGS="-I$XERCESROOT/include"
+CXXFLAGS="-W -Wall"
+LDFLAGS="-L$XERCESROOT/lib -Wl,--enable-auto-import"
+PATH="$XERCESROOT/lib:$PATH"
+
+test=n
+rebuild=n
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -rebuild)
+ rebuild=y
+ shift
+ ;;
+ -test)
+ test=y
+ shift
+ ;;
+ *)
+ error "unknown option: $1"
+ exit 1
+ ;;
+ esac
+done
+
+cd xsd-i686-windows/examples
+
+# Clean everything up if we are rebuilding.
+#
+if [ $rebuild = y ]; then
+ make clean
+fi
+
+# Build.
+#
+make CPPFLAGS="$CPPFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS"
+
+# Test.
+#
+if [ $test = y ]; then
+ make test
+fi
+
+cd ../..
diff --git a/test/windows/mingw/unpack b/test/windows/mingw/unpack
new file mode 100755
index 0000000..ff24c84
--- /dev/null
+++ b/test/windows/mingw/unpack
@@ -0,0 +1,3 @@
+#! /usr/bin/env bash
+
+../unpack -mingw