aboutsummaryrefslogtreecommitdiffstats
path: root/extra-tools/precommitTests.sh
blob: 5810baf90b14a4e293760ba8d71e7be431ed64bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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