summaryrefslogtreecommitdiff
path: root/tests/chown
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/chown
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/chown')
-rw-r--r--tests/chown/Makefile.am9
-rwxr-xr-xtests/chown/basic6
-rwxr-xr-xtests/chown/deref6
-rwxr-xr-xtests/chown/preserve-root6
-rwxr-xr-xtests/chown/separator4
5 files changed, 11 insertions, 20 deletions
diff --git a/tests/chown/Makefile.am b/tests/chown/Makefile.am
deleted file mode 100644
index c154279e2..000000000
--- a/tests/chown/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- preserve-root \
- basic \
- deref \
- separator
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chown/basic b/tests/chown/basic
index e7e3f02b4..3ad958a95 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure chown --from=... works
-# Copyright (C) 2001, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
touch f || framework_failure
diff --git a/tests/chown/deref b/tests/chown/deref
index 74684fe6a..be557e1ce 100755
--- a/tests/chown/deref
+++ b/tests/chown/deref
@@ -2,7 +2,7 @@
# For coreutils-5.2.1 and earlier, chown --dereference would skip
# symlinks having owner/group matching the specified owner/group.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ln -s no-such dangle || framework_failure
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root
index e41847291..cdc7234b5 100755
--- a/tests/chown/preserve-root
+++ b/tests/chown/preserve-root
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that --preserve-root works.
-# 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
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir d && ln -s / d/slink-to-root
diff --git a/tests/chown/separator b/tests/chown/separator
index de33831a9..b409b0295 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure "chown USER:GROUP FILE" works, and similar tests with separators.
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
chown --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
id_u=`id -u` || framework_failure
test -n "$id_u" || framework_failure