blob: 56b7c0b48af62b2088c1b9168a1310c2100c6e9b (
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
33
34
|
#!/bin/sh
set -e
JQTESTDIR=$(cd "$(dirname "$0")" && pwd)
JQBASEDIR=$JQTESTDIR/..
JQ=$JQBASEDIR/jq
if which valgrind > /dev/null; then
VALGRIND="valgrind --error-exitcode=1 --leak-check=full \
--suppressions=$JQTESTDIR/onig.supp"
Q=-q
else
VALGRIND=
Q=
fi
mods=$JQTESTDIR/modules
clean=true
d=
clean () {
if ! $clean; then
echo "See temp files in $d!"
elif [ -n "$d" ]; then
rm -rf "$d"
fi
}
trap clean EXIT
d=`mktemp -d -t || true`
if [ -z "$d" ]; then
echo "Your OS does not support mktemp(1) -d" 1>&2
exit 0
fi
|