From 716e9a45b9cfc44618edfcc2fbf9b7a066b37f1a Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Tue, 29 Nov 2011 02:41:04 +0400 Subject: [PATCH] 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. --- test/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 11e66465..d7282ff6 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -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