mirror of
https://codeberg.org/scip/udpxd.git
synced 2025-12-16 03:20:58 +01:00
21 lines
338 B
Bash
Executable File
21 lines
338 B
Bash
Executable File
#!/bin/sh
|
|
# small valgrind helper to execute unit tests with valgrind
|
|
|
|
vg="valgrind --leak-check=full --show-reachable=yes"
|
|
cmd=$1
|
|
shift
|
|
|
|
if test -z "$cmd"; then
|
|
echo "Usage: $0 <commandline ..>"
|
|
exit 1
|
|
else
|
|
if echo "$cmd" | egrep "^\.\." > /dev/null 2>&1; then
|
|
cd tests
|
|
fi
|
|
fi
|
|
|
|
$vg $cmd $* > log 2>&1
|
|
less log
|
|
rm -f log
|
|
|