From: Ulya Trofimovich Date: Tue, 1 Aug 2017 11:51:19 +0000 (+0100) Subject: Added some testing scripts for various CXX/CXXFLAGS confgurations. X-Git-Tag: 1.0~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edd31804062f941dd991a2e00e1790afc15060f0;p=re2c Added some testing scripts for various CXX/CXXFLAGS confgurations. --- diff --git a/re2c/__alltest.sh b/re2c/__alltest.sh new file mode 100755 index 00000000..6031affc --- /dev/null +++ b/re2c/__alltest.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# normal tests +for d in __build{,_asan,_ubsan,_lsan,_clang,_m32} ; do + ./${d}.sh \ + && cd ${d} \ + && make tests \ + && cd .. \ + || { cd .. ; echo "*** ${d} failed ***"; exit 1; } +done + +# skeleton +./__build.sh \ + && cd __build \ + && ./run_tests.sh --skeleton \ + && cd .. \ + || { cd .. ; echo "*** skeleton failed ***"; exit 1; } + +# mingw +./__build_mingw.sh \ + && cd __build_mingw \ + && make wtests \ + && cd .. \ + || { cd .. ; echo "*** mingw failed ***"; exit 1; } + diff --git a/re2c/build.sh b/re2c/__build.sh similarity index 84% rename from re2c/build.sh rename to re2c/__build.sh index 44055cef..a68e9be6 100755 --- a/re2c/build.sh +++ b/re2c/__build.sh @@ -1,6 +1,6 @@ #!/bin/sh -builddir=.build +builddir=__build rm -rf $builddir mkdir $builddir diff --git a/re2c/__build_asan.sh b/re2c/__build_asan.sh new file mode 100755 index 00000000..f7f462fd --- /dev/null +++ b/re2c/__build_asan.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_asan +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" && \ +make -j5 +cd .. diff --git a/re2c/__build_clang.sh b/re2c/__build_clang.sh new file mode 100755 index 00000000..6b9b19e4 --- /dev/null +++ b/re2c/__build_clang.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_clang +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CXX=clang++ && \ +make -j5 +cd .. diff --git a/re2c/__build_lsan.sh b/re2c/__build_lsan.sh new file mode 100755 index 00000000..28f16ebf --- /dev/null +++ b/re2c/__build_lsan.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_lsan +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CXXFLAGS="-fsanitize=leak" LDFLAGS="-fsanitize=leak" && \ +make -j5 +cd .. diff --git a/re2c/__build_m32.sh b/re2c/__build_m32.sh new file mode 100755 index 00000000..4e8021bf --- /dev/null +++ b/re2c/__build_m32.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_m32 +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CXXFLAGS="-m32" LDFLAGS="-m32" && \ +make -j5 +cd .. diff --git a/re2c/build_mingw.sh b/re2c/__build_mingw.sh similarity index 83% rename from re2c/build_mingw.sh rename to re2c/__build_mingw.sh index 765e80e9..c6d05b00 100755 --- a/re2c/build_mingw.sh +++ b/re2c/__build_mingw.sh @@ -1,6 +1,6 @@ #!/bin/sh -builddir=.build_mingw +builddir=__build_mingw rm -rf $builddir mkdir $builddir diff --git a/re2c/__build_redundant_exports.sh b/re2c/__build_redundant_exports.sh new file mode 100755 index 00000000..83c58b2a --- /dev/null +++ b/re2c/__build_redundant_exports.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_redundant_exports +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections -Wl,--print-gc-sections" && \ +make -j5 +cd .. diff --git a/re2c/__build_ubsan.sh b/re2c/__build_ubsan.sh new file mode 100755 index 00000000..76d2d150 --- /dev/null +++ b/re2c/__build_ubsan.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_ubsan +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CXXFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" && \ +make -j5 +cd .. diff --git a/re2c/distcheck.sh b/re2c/__distcheck.sh similarity index 73% rename from re2c/distcheck.sh rename to re2c/__distcheck.sh index fe0c88b3..c3998a3d 100755 --- a/re2c/distcheck.sh +++ b/re2c/__distcheck.sh @@ -17,8 +17,9 @@ do rm -rf $builddir mkdir $builddir cd $builddir + # 'make' implies 'make docs'; running both in parallel may cause data races ../configure --enable-docs \ - && $make_prog bootstrap docs -j5 \ + && $make_prog bootstrap -j5 \ && $make_prog distcheck -j5 cd .. done diff --git a/release.sh b/release.sh index 756af10a..8c7d0271 100755 --- a/release.sh +++ b/release.sh @@ -37,7 +37,7 @@ sed -i -E "s/$lcontext$old$rcontext/$lcontext$new$rcontext/" re2c/configure.ac # distcheck builddir=.build -cd re2c && ./distcheck.sh $builddir && cd .. +cd re2c && ./__distcheck.sh $builddir && cd .. # commit release git commit -a -m "Release $version."