From e152d05d8211444850e83e4e403a510f00f55027 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 12 Feb 2007 01:20:20 +0100 Subject: * tests/misc/pwd-unreadable-parent: Skip the test if we're definitely using the replacement. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER. --- tests/misc/pwd-unreadable-parent | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/misc/pwd-unreadable-parent') diff --git a/tests/misc/pwd-unreadable-parent b/tests/misc/pwd-unreadable-parent index f84627ec4..35d4f1816 100755 --- a/tests/misc/pwd-unreadable-parent +++ b/tests/misc/pwd-unreadable-parent @@ -26,6 +26,21 @@ if test "$VERBOSE" = yes; then readlink --version fi +skip=1 +# Run this test IFF: +# if __GETCWD_PREFIX is not defined (system getcwd is good enough) +# or HAVE_PARTLY_WORKING_GETCWD is defined +grep '^/\* #undef __GETCWD_PREFIX ' $CONFIG_HEADER > /dev/null && + skip=0 +test $skip = 1 && + grep '^#define HAVE_PARTLY_WORKING_GETCWD ' $CONFIG_HEADER > /dev/null && + skip=0 +test $skip = 1 && + { + echo 1>&2 "$0: inadequate system getcwd; skipping this test" + (exit 77); exit 77 + } + pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 -- cgit v1.2.3-54-g00ecf