test: fix test_require_external_prereq()

test_missing_external_prereq_${binary}_ variable indicates that the
binary is missing.  It must be set in test_declare_external_prereq()
outside of the fake $binary() function.
This commit is contained in:
Dmitry Kurochkin 2011-11-29 02:41:04 +04:00 committed by David Bremner
parent 9e805b6a58
commit 716e9a45b9

View file

@ -554,8 +554,8 @@ test_declare_external_prereq () {
test "$#" = 2 && name=$2 || name="$binary(1)"
hash $binary 2>/dev/null || eval "
$binary () {
test_missing_external_prereq_${binary}_=t
$binary () {
echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -e \" $name \" ||
test_subtest_missing_external_prereqs_=\"$test_subtest_missing_external_prereqs_ $name\"
false