From ac7f4e853def7f7cb2b4c859d814d964228a5d20 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 8 May 2006 12:46:01 +0000 Subject: [PATCH] (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New defines --- tests/testsuite.at | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/testsuite.at b/tests/testsuite.at index fa327be..f425f3c 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -52,10 +52,26 @@ test -z "$STAR_TESTSCRIPTS" && AT_SKIP_TEST test -r "$STAR_TESTSCRIPTS/$1" || AT_SKIP_TEST ]) +dnl AT_GZIP_PREREQ - Skip test unless gzip (or $1) is available m4_define([AT_GZIP_PREREQ],[ cat /dev/null | m4_if([$1],[],gzip,[$1]) - > /dev/null 2>&1 || AT_SKIP_TEST ]) +dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr +m4_define([AT_SORT_PREREQ],[ +test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST +]) + +dnl AT_UNPRIVILEGED_PREREQ - Skip test if running at root privileges +m4_define([AT_UNPRIVILEGED_PREREQ],[ +echo "test" > $[]$ +chmod 0 $[]$ +cat $[]$ > /dev/null 2>&1 +result=$? +rm -f $[]$ +test $result -eq 0 && AT_SKIP_TEST +]) + m4_define([AT_TAR_MKHIER],[ mkinstalldirs $1 >/dev/null genfile --file $1/$2]) -- 2.45.2