diff options
author | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
commit | baccdb349b31c47cd76fb63211f754ed33a9707e (patch) | |
tree | d03653f975fd4eb8bf71bb0c9d168614401202fa /regress/valgrind-unit.sh | |
parent | 487bdb3a5ef6075887b830ccb8a0b14f6da78e93 (diff) | |
parent | 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb (diff) |
Import openssh_6.8p1.orig.tar.gz
Diffstat (limited to 'regress/valgrind-unit.sh')
-rwxr-xr-x | regress/valgrind-unit.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/regress/valgrind-unit.sh b/regress/valgrind-unit.sh new file mode 100755 index 000000000..433cb069a --- /dev/null +++ b/regress/valgrind-unit.sh | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | UNIT_BINARY="$1" | ||
4 | shift | ||
5 | UNIT_ARGS="$@" | ||
6 | |||
7 | test "x$OBJ" = "x" && OBJ=$PWD | ||
8 | |||
9 | # This mostly replicates the logic in test-exec.sh for running the | ||
10 | # regress tests under valgrind. | ||
11 | VG_TEST=`basename $UNIT_BINARY` | ||
12 | VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p" | ||
13 | VG_OPTS="--track-origins=yes --leak-check=full --log-file=${VG_LOG}" | ||
14 | VG_OPTS="$VG_OPTS --trace-children=yes" | ||
15 | VG_PATH="valgrind" | ||
16 | if [ "x$VALGRIND_PATH" != "x" ]; then | ||
17 | VG_PATH="$VALGRIND_PATH" | ||
18 | fi | ||
19 | |||
20 | exec $VG_PATH $VG_OPTS $UNIT_BINARY $UNIT_ARGS | ||