|
@@ -18,7 +18,7 @@ printHelpExit() {
|
|
echo "$0 coverage | generate code coverage"
|
|
echo "$0 coverage | generate code coverage"
|
|
echo "$0 performance | run the performance tests"
|
|
echo "$0 performance | run the performance tests"
|
|
echo "$0 stats | run the performance tests with stats"
|
|
echo "$0 stats | run the performance tests with stats"
|
|
- echo "$0 macro | find macros without CORE"
|
|
|
|
|
|
+ echo "$0 macro | find macros without CORE"
|
|
echo "$0 time | check build time"
|
|
echo "$0 time | check build time"
|
|
exit 0
|
|
exit 0
|
|
}
|
|
}
|
|
@@ -102,7 +102,11 @@ elif [ "$task" = "valgrind" ]; then
|
|
echo "Valid valgrind types are: debug, release, all"
|
|
echo "Valid valgrind types are: debug, release, all"
|
|
printHelpExit
|
|
printHelpExit
|
|
fi
|
|
fi
|
|
- valgrind="valgrind"
|
|
|
|
|
|
+ valgrind="valgrind \
|
|
|
|
+ --leak-check=full \
|
|
|
|
+ --show-leak-kinds=all \
|
|
|
|
+ --suppressions=../valgrind.supp
|
|
|
|
+ "
|
|
elif [ "$task" = "performance" ]; then
|
|
elif [ "$task" = "performance" ]; then
|
|
build_profile=true
|
|
build_profile=true
|
|
performance=true
|
|
performance=true
|
|
@@ -125,7 +129,7 @@ fi
|
|
buildProfile() {
|
|
buildProfile() {
|
|
folder=$1
|
|
folder=$1
|
|
shift 1
|
|
shift 1
|
|
- if [ ! -e "$folder" ]; then
|
|
|
|
|
|
+ if [ ! -e "$folder" ]; then
|
|
cmake -B "$folder" -S . -G Ninja -DCMAKE_C_COMPILER=${compiler} -DCMAKE_INSTALL_PREFIX=../install $@
|
|
cmake -B "$folder" -S . -G Ninja -DCMAKE_C_COMPILER=${compiler} -DCMAKE_INSTALL_PREFIX=../install $@
|
|
fi
|
|
fi
|
|
ninja -C "$folder"
|
|
ninja -C "$folder"
|
|
@@ -146,15 +150,15 @@ fi
|
|
|
|
|
|
function runTests() {
|
|
function runTests() {
|
|
echo "--------------Invalid alloc exit----------------"
|
|
echo "--------------Invalid alloc exit----------------"
|
|
- LLVM_PROFILE_FILE="alloc.profraw" $valgrind ./test alloc $valgrind || true
|
|
|
|
|
|
+ LLVM_PROFILE_FILE="alloc.profraw" ./test alloc || true
|
|
echo "--------------Invalid realloc exit--------------"
|
|
echo "--------------Invalid realloc exit--------------"
|
|
- LLVM_PROFILE_FILE="realloc.profraw" $valgrind ./test realloc $valgrind || true
|
|
|
|
|
|
+ LLVM_PROFILE_FILE="realloc.profraw" ./test realloc || true
|
|
echo "--------------Pre canary detection--------------"
|
|
echo "--------------Pre canary detection--------------"
|
|
- LLVM_PROFILE_FILE="pre_canary.profraw" $valgrind ./test pre_canary $valgrind || true
|
|
|
|
|
|
+ LLVM_PROFILE_FILE="pre_canary.profraw" ./test pre_canary || true
|
|
echo "--------------Post canary detection-------------"
|
|
echo "--------------Post canary detection-------------"
|
|
- LLVM_PROFILE_FILE="post_canary.profraw" $valgrind ./test post_canary $valgrind || true
|
|
|
|
|
|
+ LLVM_PROFILE_FILE="post_canary.profraw" ./test post_canary || true
|
|
echo "--------------Test Fails------------------------"
|
|
echo "--------------Test Fails------------------------"
|
|
- LLVM_PROFILE_FILE="test.profraw" $valgrind ./test test $valgrind || true
|
|
|
|
|
|
+ LLVM_PROFILE_FILE="test.profraw" ./test test || true
|
|
echo "--------------Default run-----------------------"
|
|
echo "--------------Default run-----------------------"
|
|
LLVM_PROFILE_FILE="default.profraw" $valgrind ./test light $valgrind < ../readLineTest || true
|
|
LLVM_PROFILE_FILE="default.profraw" $valgrind ./test light $valgrind < ../readLineTest || true
|
|
}
|
|
}
|
|
@@ -213,4 +217,4 @@ if $coverage; then
|
|
llvm-profdata-16 merge -sparse $files -o build_debug/default.profdata
|
|
llvm-profdata-16 merge -sparse $files -o build_debug/default.profdata
|
|
llvm-cov-16 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="test/" -line-coverage-lt=100
|
|
llvm-cov-16 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="test/" -line-coverage-lt=100
|
|
fi
|
|
fi
|
|
-fi
|
|
|
|
|
|
+fi
|