aboutsummaryrefslogtreecommitdiffstats
path: root/extra-tools/precommitTests.sh
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-06-29 00:27:38 +0000
committerbloodstalker <thabogre@gmail.com>2017-06-29 00:27:38 +0000
commitb25ad9d0e0635b9e4acd85f508e04d0cee747fd2 (patch)
tree8ab42ebc60fcc87e4f1504e8c09e006e5de79a7e /extra-tools/precommitTests.sh
parentxml schema to check the mutagen report (diff)
downloadmutator-b25ad9d0e0635b9e4acd85f508e04d0cee747fd2.tar.gz
mutator-b25ad9d0e0635b9e4acd85f508e04d0cee747fd2.zip
added the schema tests for mutagen report
Diffstat (limited to 'extra-tools/precommitTests.sh')
-rwxr-xr-xextra-tools/precommitTests.sh34
1 files changed, 31 insertions, 3 deletions
diff --git a/extra-tools/precommitTests.sh b/extra-tools/precommitTests.sh
index 0fb5ad8..393193d 100755
--- a/extra-tools/precommitTests.sh
+++ b/extra-tools/precommitTests.sh
@@ -4,6 +4,7 @@ Red="\033[0;31m"
Green="\033[0;32m"
Lblue="\033[1;34m"
Orange="\033[0;33m"
+Magenta="\033[1;35m"
NC="\033[0m"
REP_FILE="test/precommit.rep"
@@ -70,7 +71,16 @@ printf "${Lblue}running c++11 mutator-lvl0 xml report schema test...\n${NC}" | t
if [[ $? == 0 ]];then
printf "${Green}c++11 mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
else
- printf "${Red}c++11 mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+ printf "${Red}c++11 mutator-lvl0 xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
+fi
+
+printf "${Magenta}running c++11 mutagen xml report schema test...\n${NC}" | tee -a ./test/precommit.rep
+"xmllint" --noout --schema ./samples/m0.xsd ./m0.xml
+
+if [[ $? == 0 ]];then
+ printf "${Green}c++11 mutagen xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+else
+ printf "${Red}c++11 mutagen xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
fi
printf "${Lblue}running smoke tests on mutator-lvl0...\n${NC}" | tee -a ./test/precommit.rep
@@ -119,7 +129,16 @@ printf "${Lblue}running c++1z mutator-lvl0 xml report schema test...\n${NC}" | t
if [[ $? == 0 ]];then
printf "${Green}c++1z mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
else
- printf "${Red}c++1z mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+ printf "${Red}c++1z mutator-lvl0 xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
+fi
+
+printf "${Magenta}running c++1z mutagen xml report schema test...\n${NC}" | tee -a ./test/precommit.rep
+"xmllint" --noout --schema ./samples/m0.xsd ./m0.xml
+
+if [[ $? == 0 ]];then
+ printf "${Green}c++1z mutagen xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+else
+ printf "${Red}c++1z mutagen xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
fi
printf "${Lblue}running smoke tests on mutator-lvl0...\n${NC}" | tee -a ./test/precommit.rep
@@ -164,7 +183,16 @@ printf "${Lblue}running c++14 mutator-lvl0 xml report schema test...\n${NC}" | t
if [[ $? == 0 ]];then
printf "${Green}c++14 mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
else
- printf "${Red}c++14 mutator-lvl0 xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+ printf "${Red}c++14 mutator-lvl0 xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
+fi
+
+printf "${Magenta}running c++14 mutagen xml report schema test...\n${NC}" | tee -a ./test/precommit.rep
+"xmllint" --noout --schema ./samples/m0.xsd ./m0.xml
+
+if [[ $? == 0 ]];then
+ printf "${Green}c++14 mutagen xml report xsd passed.\n${NC}" | tee -a ./test/precommit.rep
+else
+ printf "${Red}c++14 mutagen xml report xsd failed.\n${NC}" | tee -a ./test/precommit.rep
fi
printf "${Lblue}running smoke tests on mutator-lvl0...\n${NC}" | tee -a ./test/precommit.rep