]> granicus.if.org Git - re2c/commitdiff
Added some testing scripts for various CXX/CXXFLAGS confgurations.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 1 Aug 2017 11:51:19 +0000 (12:51 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 1 Aug 2017 11:51:19 +0000 (12:51 +0100)
re2c/__alltest.sh [new file with mode: 0755]
re2c/__build.sh [moved from re2c/build.sh with 84% similarity]
re2c/__build_asan.sh [new file with mode: 0755]
re2c/__build_clang.sh [new file with mode: 0755]
re2c/__build_lsan.sh [new file with mode: 0755]
re2c/__build_m32.sh [new file with mode: 0755]
re2c/__build_mingw.sh [moved from re2c/build_mingw.sh with 83% similarity]
re2c/__build_redundant_exports.sh [new file with mode: 0755]
re2c/__build_ubsan.sh [new file with mode: 0755]
re2c/__distcheck.sh [moved from re2c/distcheck.sh with 73% similarity]
release.sh

diff --git a/re2c/__alltest.sh b/re2c/__alltest.sh
new file mode 100755 (executable)
index 0000000..6031aff
--- /dev/null
@@ -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; }
+
similarity index 84%
rename from re2c/build.sh
rename to re2c/__build.sh
index 44055cef2ffa834b8f696a110d76e2f6060f523e..a68e9be61ee11e3b800f2a0c2d57776cd8c51331 100755 (executable)
@@ -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 (executable)
index 0000000..f7f462f
--- /dev/null
@@ -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 (executable)
index 0000000..6b9b19e
--- /dev/null
@@ -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 (executable)
index 0000000..28f16eb
--- /dev/null
@@ -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 (executable)
index 0000000..4e8021b
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+builddir=__build_m32
+rm -rf $builddir
+mkdir $builddir
+
+cd $builddir
+../configure CXXFLAGS="-m32" LDFLAGS="-m32" && \
+make -j5
+cd ..
similarity index 83%
rename from re2c/build_mingw.sh
rename to re2c/__build_mingw.sh
index 765e80e97221fd482987a038eab1bc3df259e42a..c6d05b00443c4ef37737f3fe52f3ff532ab415e1 100755 (executable)
@@ -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 (executable)
index 0000000..83c58b2
--- /dev/null
@@ -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 (executable)
index 0000000..76d2d15
--- /dev/null
@@ -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 ..
similarity index 73%
rename from re2c/distcheck.sh
rename to re2c/__distcheck.sh
index fe0c88b33de35ed8b7343371a6ef77dbf72eb8a8..c3998a3d367327fe223837e2f9c67e0c2467134c 100755 (executable)
@@ -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
index 756af10a0849d025c97146680b7d07f86d407133..8c7d0271df7977bc37a169a1ef720428954654fc 100755 (executable)
@@ -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."