]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Explicitly test command -v host output before trying host command.
authorMark Wielaard <mark@klomp.org>
Thu, 4 Feb 2016 22:38:06 +0000 (22:38 +0000)
committerMark Wielaard <mark@klomp.org>
Thu, 4 Feb 2016 22:38:06 +0000 (22:38 +0000)
We have to explicitly test command -v host worked otherwise on systems
that do not have 'host' installed will return error code 127 and stop
testing. This is because vg_regtest uses '/bin/sh -c' to execute the
prereq command. Found by Petar Jovanovic.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15781

none/tests/res_search.vgtest

index 3a03261264db463c53b090ad7d380bde944a89ba..2a32cf3b7fac4bd620e8aa03bd9bdcec86bf168d 100644 (file)
@@ -1,4 +1,4 @@
-prereq: command -v host >/dev/null 2>/dev/null && host www.yahoo.com > /dev/null && ! ../../tests/os_test darwin
+prereq: test $(command -v host) && host www.yahoo.com > /dev/null && ! ../../tests/os_test darwin
 prog: res_search
 args: www.yahoo.com
 vgopts: -q