summaryrefslogtreecommitdiff
path: root/tests/chgrp
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/chgrp
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/chgrp')
-rw-r--r--tests/chgrp/Makefile.am12
-rwxr-xr-xtests/chgrp/basic8
-rwxr-xr-xtests/chgrp/default-no-deref6
-rwxr-xr-xtests/chgrp/deref6
-rwxr-xr-xtests/chgrp/no-x8
-rwxr-xr-xtests/chgrp/posix-H6
-rwxr-xr-xtests/chgrp/recurse6
7 files changed, 20 insertions, 32 deletions
diff --git a/tests/chgrp/Makefile.am b/tests/chgrp/Makefile.am
deleted file mode 100644
index 3033e1b7b..000000000
--- a/tests/chgrp/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- default-no-deref \
- basic \
- deref \
- no-x \
- posix-H \
- recurse
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chgrp/basic b/tests/chgrp/basic
index 8a795d63b..b242a2a88 100755
--- a/tests/chgrp/basic
+++ b/tests/chgrp/basic
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure chgrp is reasonable
-# Copyright (C) 2000-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-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,9 +21,9 @@ if test "$VERBOSE" = yes; then
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref
index e7239d52d..e1f711d7c 100755
--- a/tests/chgrp/default-no-deref
+++ b/tests/chgrp/default-no-deref
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that chgrp -R does not dereference symlinks.
-# 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,8 +21,8 @@ if test "$VERBOSE" = yes; then
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g2=$2
diff --git a/tests/chgrp/deref b/tests/chgrp/deref
index ebf92e470..f3453fb7a 100755
--- a/tests/chgrp/deref
+++ b/tests/chgrp/deref
@@ -1,7 +1,7 @@
#!/bin/sh
# see if chgrp can change the group of a symlink
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x
index 57900d83c..f4df292f5 100755
--- a/tests/chgrp/no-x
+++ b/tests/chgrp/no-x
@@ -2,7 +2,7 @@
# Make sure chgrp 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,9 +22,9 @@ if test "$VERBOSE" = yes; then
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
set _ $groups; shift
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H
index a9b41d011..88345767b 100755
--- a/tests/chgrp/posix-H
+++ b/tests/chgrp/posix-H
@@ -1,7 +1,7 @@
#!/bin/sh
# Test POSIX-mandated -H option.
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse
index a0cacd645..4ae30f969 100755
--- a/tests/chgrp/recurse
+++ b/tests/chgrp/recurse
@@ -1,7 +1,7 @@
#!/bin/sh
# ad-hoc tests of chgrp with -R and -H or -L and symlinks
-# Copyright (C) 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003-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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1