aboutsummaryrefslogtreecommitdiffstats
path: root/extra-tools
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-02-12 00:28:25 +0000
committerbloodstalker <thabogre@gmail.com>2017-02-12 00:28:25 +0000
commit65683ef831c37020ec9059fd01e1590af955a28b (patch)
treef40a0ff6241689e39e36beaceec2afbcbdc0bb14 /extra-tools
parentfixed and working (diff)
downloadmutator-65683ef831c37020ec9059fd01e1590af955a28b.tar.gz
mutator-65683ef831c37020ec9059fd01e1590af955a28b.zip
the pre commit test script
Diffstat (limited to 'extra-tools')
-rwxr-xr-xextra-tools/precommitTests.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/extra-tools/precommitTests.sh b/extra-tools/precommitTests.sh
new file mode 100755
index 0000000..5810baf
--- /dev/null
+++ b/extra-tools/precommitTests.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+Red="\033[0;31m"
+Green="\033[0;32m"
+Lblue="\033[1;34m"
+NC="\033[0m"
+
+printf "${Lblue}switching to mutator root...\n${NC}"
+cd ..
+
+"make" clean
+echo ""
+
+printf "${Lblue}testing the build in C++11...\n${NC}"
+"make" CXX=clang++ BIULD_MODE=COV_NO_CLANG
+echo ""
+
+if [[ $? == 0 ]]; then
+ printf "${Green}mutator c++11 test build passed.\n${NC}"
+else
+ printf "${Red}mutator c++11 test build failed.\n${NC}"
+fi
+
+# running mutator-lvl0 on the tdd sources
+"./mutator-lvl0" -SysHeader=false -MainOnly=true ./test/testFuncs1.c ./test/testFuncs2.c ./test/testFuncs3.c -- -std=c90 -I/lib/gcc/x86_64-redhat-linux/6.3.1/include -Wall > ./test/misra-log
+
+if [[ $? == 0 ]]; then
+ echo "${Green}mutator-lvl0 smoke test on the tdds passed.\n${NC}"
+else
+ echo "${Red}mutator-lvl0 smoke test on the tdds failed.\n${NC}"
+fi
+
+
+