From 2e994e681c4ca4d70280c2e3f610769f48184249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 15 Jan 2018 10:57:02 +0200 Subject: [PATCH] Add a script for building the test applications and running them --- hello/.gitignore | 1 + run-tests.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 hello/.gitignore create mode 100755 run-tests.sh diff --git a/hello/.gitignore b/hello/.gitignore new file mode 100644 index 0000000..b883f1f --- /dev/null +++ b/hello/.gitignore @@ -0,0 +1 @@ +*.exe diff --git a/run-tests.sh b/run-tests.sh new file mode 100755 index 0000000..885095b --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +set -ex + +if [ $# -lt 1 ]; then + echo $0 dest + exit 1 +fi +PREFIX="$1" +export PATH=$PREFIX/bin:$PATH + +: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}} + +cd hello +for arch in $ARCHS; do + $arch-w64-mingw32-clang hello.c -o hello-$arch.exe + $arch-w64-mingw32-clang hello-tls.c -o hello-tls-$arch.exe + $arch-w64-mingw32-clang++ hello.cpp -o hello-cpp-$arch.exe -fno-exceptions + $arch-w64-mingw32-clang++ hello-exception.cpp -o hello-exception-$arch.exe + if [ "$arch" = "i686" ] || [ "$arch" = "x86_64" ]; then + wine hello-$arch.exe + wine hello-tls-$arch.exe + wine hello-cpp-$arch.exe + wine hello-exception-$arch.exe + fi +done