diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2002-08-19 13:09:00 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2002-08-19 13:09:00 +0000 |
commit | 15c2697c5f85d7a70f0460ddd8a8b0080b6fd4b5 (patch) | |
tree | edfa6a723dbbf02a4fb1f5286db4e98a41b6ce18 /tests/defs | |
parent | afe7e679b3a27356ce7721bd5a7274c030bcc99b (diff) | |
download | automake-15c2697c5f85d7a70f0460ddd8a8b0080b6fd4b5.tar.gz |
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.
Diffstat (limited to 'tests/defs')
-rw-r--r-- | tests/defs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/defs b/tests/defs index 631504099..42ecd490b 100644 --- a/tests/defs +++ b/tests/defs @@ -56,6 +56,17 @@ then 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" |