2002-08-19 Alexandre Duret-Lutz <duret_g@epita.fr>
+ Fix for PR automake/345:
+ * tests/defs: Add support for required=non-root, stolen
+ from fileutils' test suite.
+ * tests/destdir.test: Use required=non-root.
+
* tests/vtexi.test: Fix spurious failure introduced on 2002-07-30.
2002-08-17 Tom Tromey <tromey@redhat.com>
echo "$me: running $CXX --version"
( $CXX --version ) || exit 77
;;
+ non-root)
+ # Skip this test case if the user is root.
+ # We try to append to a read-only file to detect this.
+ priv_check_temp=priv-check.$$
+ touch $priv_check_temp || exit 1
+ chmod a-w $priv_check_temp || exit 1
+ (echo foo >> $priv_check_temp) >/dev/null 2>&1
+ overwrite_status=$?
+ rm -f $priv_check_temp
+ test $overwrite_status = 0 && exit 77
+ ;;
# Generic case: the tool must support --version.
*)
echo "$me: running $tool --version"
# Make sure that `make distcheck' can find some $(DESTDIR) omissions.
# PR/186.
+# The feature we test here relies on read-only files.
+# It will only work for non-root users.
+required='non-root'
+
. $srcdir/defs || exit 1
set -e