automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: fix for PR/345


From: Alexandre Duret-Lutz
Subject: FYI: fix for PR/345
Date: 19 Aug 2002 15:08:40 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

I'm checking this in and closing the PR.

2002-08-19  Alexandre Duret-Lutz  <address@hidden>

        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.

Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.58
diff -u -r1.58 defs
--- tests/defs  31 Jul 2002 19:58:26 -0000      1.58
+++ tests/defs  19 Aug 2002 13:06:36 -0000
@@ -56,6 +56,17 @@
        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"
Index: tests/destdir.test
===================================================================
RCS file: /cvs/automake/automake/tests/destdir.test,v
retrieving revision 1.1
diff -u -r1.1 destdir.test
--- tests/destdir.test  17 May 2002 10:49:55 -0000      1.1
+++ tests/destdir.test  19 Aug 2002 13:06:36 -0000
@@ -3,6 +3,10 @@
 # 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

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]