Files
llvm-mingw/run-tests.sh
T
Martin Storsjö 7297bb65a5 Add a more thorough test case, testing various CRT features
Simplify building of the test cases at the same time; stop building
hello-cpp with -fno-exceptions.
2018-03-20 12:00:56 +02:00

48 lines
933 B
Bash
Executable File

#!/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 test
TESTS_C="hello hello-tls crt-test"
TESTS_CPP="hello-cpp hello-exception"
for arch in $ARCHS; do
for test in $TESTS_C; do
$arch-w64-mingw32-clang $test.c -o $test-$arch.exe
done
for test in $TESTS_CPP; do
$arch-w64-mingw32-clang++ $test.cpp -o $test-$arch.exe
done
case $arch in
i686|x86_64)
RUN=wine
COPY=
;;
armv7)
RUN="$RUN_ARMV7"
COPY="$COPY_ARMV7"
;;
aarch64)
RUN="$RUN_AARCH64"
COPY="$COPY_AARCH64"
;;
esac
for test in $TESTS_C $TESTS_CPP; do
file=$test-$arch.exe
if [ -n "$COPY" ]; then
$COPY $file
fi
if [ -n "$RUN" ]; then
$RUN $file
fi
done
done