]> Dogcows Code - chaz/tar/commitdiff
(AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New defines
authorSergey Poznyakoff <gray@gnu.org.ua>
Mon, 8 May 2006 12:46:01 +0000 (12:46 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Mon, 8 May 2006 12:46:01 +0000 (12:46 +0000)
tests/testsuite.at

index fa327be19b4d841086537acff7c4aa4bf104ca5a..f425f3ccae6d46d5f43460661265986e2da88264 100644 (file)
@@ -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])
This page took 0.024423 seconds and 4 git commands to generate.