-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_valgrind.sh
executable file
·28 lines (21 loc) · 1.04 KB
/
run_valgrind.sh
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
#!/usr/bin/sh
set -e
echo "Testing if valgrind integration works (unoptimized)"
gcc -g -O0 test_valgrind.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind --log-fd=-1 ./test-binary
echo "Testing if valgrind integration works (optimized)"
gcc -g -O2 test_valgrind.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind --log-fd=-1 ./test-binary
echo "Testing covarge with valgrind integration (unoptimized)"
gcc -g -O0 test_coverage.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind ./test-binary
echo "Testing covarge with valgrind integration (optimized)"
gcc -g -O2 test_coverage.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind ./test-binary
echo "Testing with valgrind integration and random testcases (unoptimized)"
gcc -g -O0 test_fuzzer.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind ./test-binary -n 100
echo "Testing with valgrind integration and random testcases (optimized)"
gcc -g -O2 test_fuzzer.c yalloc/yalloc.c -DYALLOC_VALGRIND -o test-binary
valgrind ./test-binary -n 100
echo "All fine!"