summaryrefslogtreecommitdiff
path: root/tests/chmod
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-04-17 23:34:45 +0200
committerJim Meyering <meyering@redhat.com>2008-04-21 00:01:51 +0200
commit512e111a926fedbd7dc7b0875ab837dbb7d2a7a6 (patch)
treef77cdb2c6bfc71f0560cf073324365c0a3e65526 /tests/chmod
parentd25bf9dceb90dcb91f8af57aff433273c7145ff7 (diff)
downloadcoreutils-512e111a926fedbd7dc7b0875ab837dbb7d2a7a6.tar.xz
Revamp test-related Makefiles.
One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. A lot of these changes are like this: -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... * tests/test-lib.sh (rwx_to_mode_): ...this new function. * tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode. (SUBDIRS): Remove each dir with a removed Makefile.am. (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries.
Diffstat (limited to 'tests/chmod')
-rw-r--r--tests/chmod/Makefile.am16
-rwxr-xr-xtests/chmod/c-option6
-rwxr-xr-xtests/chmod/equal-x4
-rwxr-xr-xtests/chmod/equals4
-rwxr-xr-xtests/chmod/inaccessible4
-rwxr-xr-xtests/chmod/no-x6
-rwxr-xr-xtests/chmod/octal4
-rwxr-xr-xtests/chmod/setgid4
-rwxr-xr-xtests/chmod/thru-dangling4
-rwxr-xr-xtests/chmod/umask-x6
-rwxr-xr-xtests/chmod/usage6
11 files changed, 24 insertions, 40 deletions
diff --git a/tests/chmod/Makefile.am b/tests/chmod/Makefile.am
deleted file mode 100644
index a0e0053a0..000000000
--- a/tests/chmod/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- thru-dangling \
- inaccessible \
- c-option \
- equal-x \
- equals \
- no-x \
- octal \
- setgid \
- umask-x \
- usage
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index e491b75b0..838270f01 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod's --changes (-c) option works.
-# Copyright (C) 2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
file=f
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x
index 672dab29b..6400d029a 100755
--- a/tests/chmod/equal-x
+++ b/tests/chmod/equal-x
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "chmod =x" and the like.
-# Copyright (C) 1999, 2000, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
file=f
touch $file || framework_failure
diff --git a/tests/chmod/equals b/tests/chmod/equals
index 47a9c52d0..7ad2793e1 100755
--- a/tests/chmod/equals
+++ b/tests/chmod/equals
@@ -3,7 +3,7 @@
# Before fileutils-4.1.2, some of them didn't.
# Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
-# Copyright (C) 2001, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible
index 318d4bba5..6e8744dbb 100755
--- a/tests/chmod/inaccessible
+++ b/tests/chmod/inaccessible
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for the bug fixed on 2006-09-20.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/e || framework_failure
chmod 0 d/e d || framework_failure
diff --git a/tests/chmod/no-x b/tests/chmod/no-x
index 8e84ad262..7a7995a00 100755
--- a/tests/chmod/no-x
+++ b/tests/chmod/no-x
@@ -2,7 +2,7 @@
# Make sure chmod gives the right diagnostic for a readable,
# but inaccessible directory.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p d/no-x/y a/b || framework_failure
diff --git a/tests/chmod/octal b/tests/chmod/octal
index 781b904dc..32c55120c 100755
--- a/tests/chmod/octal
+++ b/tests/chmod/octal
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that chmod diagnoses a certain type of invalid mode string
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index cee9ca6bb..c716e4b2a 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
mkdir d || framework_failure
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling
index 9423a7401..0924b4779 100755
--- a/tests/chmod/thru-dangling
+++ b/tests/chmod/thru-dangling
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for proper error and exit code of chmod on a dangling symlink.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s non-existent dangle || framework_failure
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x
index c7b139b88..9f33fbfc7 100755
--- a/tests/chmod/umask-x
+++ b/tests/chmod/umask-x
@@ -1,7 +1,7 @@
#!/bin/sh
# Test that chmod -x file reports an error if the result is executable.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
touch file
diff --git a/tests/chmod/usage b/tests/chmod/usage
index 8e45edc69..8a641b87f 100755
--- a/tests/chmod/usage
+++ b/tests/chmod/usage
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod works correctly with odd option combinations.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0