blob: 76b5671441fd7c7d01b4383ea2fded316339499e (
plain)
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
|
#!/bin/bash
#
# run/benchmark <name>
executable=build/benchmark/$1
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/carl/osx-environment/64/lib
if [ "$1" == "--debug" ]; then
shift;
gdb --args $executable --catch_system_errors=no --log_level=test_suite
elif [ "$1" == "--backtrace" ]; then
shift;
gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args $executable --catch_system_errors=yes
elif [ "$1" == "--valgrind" ]; then
shift;
valgrind --tool="memcheck" --suppressions=suppressions $executable
elif [ "$1" == "--callgrind" ]; then
shift;
valgrind --tool="callgrind" $executable
elif [ "$1" == "--quiet" ]; then
shift;
$executable --catch_system_errors=no
elif [ "$1" == "--drd" ]; then
shift;
valgrind --tool="drd" $executable
elif [ "$1" == "--helgrind" ]; then
shift;
valgrind --tool="helgrind" $executable
else
ulimit -c unlimited
$executable --catch_system_errors=no --log_level=test_suite
fi
|