projects
/
petitboot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils/pb-console: reset after UI exit
[petitboot]
/
test
/
urls
/
run-url-test.in
diff --git
a/test/urls/run-url-test.in
b/test/urls/run-url-test.in
index 834166f9e4cf8f7dcef595e4bdb540d23dbed155..c98fe8b660684894014db046f1819de2fa1a7b76 100755
(executable)
--- a/
test/urls/run-url-test.in
+++ b/
test/urls/run-url-test.in
@@
-1,5
+1,12
@@
#!/bin/bash
#!/bin/bash
+valgrind=''
+if [ "$1" = "--valgrind" ]
+then
+ shift
+ valgrind='valgrind --leak-check=full --error-exitcode=1'
+fi
+
parser="@abs_builddir@/parse-url"
testfile=$1
parser="@abs_builddir@/parse-url"
testfile=$1
@@
-8,7
+15,7
@@
url=$(head -n1 $testfile)
tmp=$(mktemp)
trap "rm $tmp" EXIT
tmp=$(mktemp)
trap "rm $tmp" EXIT
-$parser $url > $tmp
+$
valgrind $
parser $url > $tmp
if test $? -ne 0
then
echo "Error running $parser on $testfile"
if test $? -ne 0
then
echo "Error running $parser on $testfile"