40 lines
959 B
Bash
Executable file
40 lines
959 B
Bash
Executable file
#!/bin/sh
|
|
|
|
main() {
|
|
make clean
|
|
CC=gcc CFLAGS='-g -O0' make
|
|
|
|
echo 'Running memory leak check'
|
|
valgrind \
|
|
--tool=memcheck \
|
|
--trace-children=yes \
|
|
--track-fds=all \
|
|
--read-var-info=yes \
|
|
--read-inline-info=yes \
|
|
--leak-check=full \
|
|
--leak-resolution=high \
|
|
--show-leak-kinds=all \
|
|
--errors-for-leak-kinds=all \
|
|
--show-reachable=yes \
|
|
--undef-value-errors=yes \
|
|
--track-origins=yes \
|
|
--keep-stacktraces=alloc-and-free \
|
|
--num-callers=40 \
|
|
--error-exitcode=1 \
|
|
--log-file=memcheck.log \
|
|
./vessel
|
|
|
|
echo 'Running thread error check'
|
|
valgrind \
|
|
--tool=helgrind \
|
|
--trace-children=yes \
|
|
--read-var-info=yes \
|
|
--read-inline-info=yes \
|
|
--track-fds=all \
|
|
--num-callers=40 \
|
|
--error-exitcode=1 \
|
|
--log-file=helgrind.log \
|
|
./vessel
|
|
}
|
|
|
|
main
|