Build tests in a separate subdirectory for each arch
This eases cases when testcases contain DLLs, whose names won't contain the arch name.
This commit is contained in:
1 parent
cef45a8937
commit
0448bd616a
2 files changed
+19
-10
No files matched your search
+4
-2
@@ -55,8 +55,9 @@ ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
|
|||||||
COPY test/*.c ./test/
|
COPY test/*.c ./test/
|
||||||
RUN cd test && \
|
RUN cd test && \
|
||||||
for arch in $TOOLCHAIN_ARCHS; do \
|
for arch in $TOOLCHAIN_ARCHS; do \
|
||||||
|
mkdir -p $arch && \
|
||||||
for test in hello hello-tls crt-test setjmp; do \
|
for test in hello hello-tls crt-test setjmp; do \
|
||||||
$arch-w64-mingw32-clang $test.c -o $test-$arch.exe || exit 1; \
|
$arch-w64-mingw32-clang $test.c -o $arch/$test.exe || exit 1; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -68,8 +69,9 @@ RUN ./build-libcxx.sh $TOOLCHAIN_PREFIX
|
|||||||
COPY test/*.cpp ./test/
|
COPY test/*.cpp ./test/
|
||||||
RUN cd test && \
|
RUN cd test && \
|
||||||
for arch in $TOOLCHAIN_ARCHS; do \
|
for arch in $TOOLCHAIN_ARCHS; do \
|
||||||
|
mkdir -p $arch && \
|
||||||
for test in hello-cpp hello-exception tlstest-main; do \
|
for test in hello-cpp hello-exception tlstest-main; do \
|
||||||
$arch-w64-mingw32-clang++ $test.cpp -o $test-$arch.exe || exit 1; \
|
$arch-w64-mingw32-clang++ $test.cpp -o $arch/$test.exe || exit 1; \
|
||||||
done; \
|
done; \
|
||||||
$arch-w64-mingw32-clang++ tlstest-lib.cpp -shared -o tlstest-lib-$arch.dll || exit 1; \
|
$arch-w64-mingw32-clang++ tlstest-lib.cpp -shared -o tlstest-lib-$arch.dll || exit 1; \
|
||||||
done
|
done
|
||||||
|
|||||||
+15
-8
@@ -15,19 +15,24 @@ cd test
|
|||||||
TESTS_C="hello hello-tls crt-test setjmp"
|
TESTS_C="hello hello-tls crt-test setjmp"
|
||||||
TESTS_C_NO_BUILTIN="crt-test"
|
TESTS_C_NO_BUILTIN="crt-test"
|
||||||
TESTS_CPP="hello-cpp hello-exception tlstest-main"
|
TESTS_CPP="hello-cpp hello-exception tlstest-main"
|
||||||
|
TESTS_CPP_DLL="tlstest-lib"
|
||||||
for arch in $ARCHS; do
|
for arch in $ARCHS; do
|
||||||
|
mkdir -p $arch
|
||||||
for test in $TESTS_C; do
|
for test in $TESTS_C; do
|
||||||
$arch-w64-mingw32-clang $test.c -o $test-$arch.exe
|
$arch-w64-mingw32-clang $test.c -o $arch/$test.exe
|
||||||
done
|
done
|
||||||
TESTS_EXTRA=""
|
TESTS_EXTRA=""
|
||||||
for test in $TESTS_C_NO_BUILTIN; do
|
for test in $TESTS_C_NO_BUILTIN; do
|
||||||
$arch-w64-mingw32-clang $test.c -o $test-no-builtin-$arch.exe -fno-builtin
|
$arch-w64-mingw32-clang $test.c -o $arch/$test-no-builtin.exe -fno-builtin
|
||||||
TESTS_EXTRA="$TESTS_EXTRA $test-no-builtin"
|
TESTS_EXTRA="$TESTS_EXTRA $test-no-builtin"
|
||||||
done
|
done
|
||||||
for test in $TESTS_CPP; do
|
for test in $TESTS_CPP; do
|
||||||
$arch-w64-mingw32-clang++ $test.cpp -o $test-$arch.exe
|
$arch-w64-mingw32-clang++ $test.cpp -o $arch/$test.exe
|
||||||
done
|
done
|
||||||
$arch-w64-mingw32-clang++ tlstest-lib.cpp -shared -o tlstest-lib-$arch.dll
|
for test in $TESTS_CPP_DLL; do
|
||||||
|
$arch-w64-mingw32-clang++ $test.cpp -shared -o $arch/$test.dll
|
||||||
|
done
|
||||||
|
DLL="$TESTS_CPP_DLL"
|
||||||
case $arch in
|
case $arch in
|
||||||
i686|x86_64)
|
i686|x86_64)
|
||||||
RUN=wine
|
RUN=wine
|
||||||
@@ -42,12 +47,14 @@ for arch in $ARCHS; do
|
|||||||
COPY="$COPY_AARCH64"
|
COPY="$COPY_AARCH64"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cp tlstest-lib-$arch.dll tlstest-lib.dll
|
cd $arch
|
||||||
if [ -n "$COPY" ]; then
|
if [ -n "$COPY" ]; then
|
||||||
$COPY tlstest-lib.dll
|
for i in $DLL; do
|
||||||
|
$COPY $i.dll
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
for test in $TESTS_C $TESTS_CPP $TESTS_EXTRA; do
|
for test in $TESTS_C $TESTS_CPP $TESTS_EXTRA; do
|
||||||
file=$test-$arch.exe
|
file=$test.exe
|
||||||
if [ -n "$COPY" ]; then
|
if [ -n "$COPY" ]; then
|
||||||
$COPY $file
|
$COPY $file
|
||||||
fi
|
fi
|
||||||
@@ -55,5 +62,5 @@ for arch in $ARCHS; do
|
|||||||
$RUN $file
|
$RUN $file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f tlstest-lib.dll
|
cd ..
|
||||||
done
|
done
|
||||||
Reference in new issue
Block a user