diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-17 23:34:45 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-21 00:01:51 +0200 |
commit | 512e111a926fedbd7dc7b0875ab837dbb7d2a7a6 (patch) | |
tree | f77cdb2c6bfc71f0560cf073324365c0a3e65526 /tests/tail-2 | |
parent | d25bf9dceb90dcb91f8af57aff433273c7145ff7 (diff) | |
download | coreutils-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/tail-2')
-rw-r--r-- | tests/tail-2/Makefile.am | 27 | ||||
-rwxr-xr-x | tests/tail-2/append-only | 4 | ||||
-rwxr-xr-x | tests/tail-2/assert | 2 | ||||
-rwxr-xr-x | tests/tail-2/assert-2 | 2 | ||||
-rwxr-xr-x | tests/tail-2/big-4gb | 6 | ||||
-rwxr-xr-x | tests/tail-2/infloop-1 | 4 | ||||
-rwxr-xr-x | tests/tail-2/proc-ksyms | 4 | ||||
-rwxr-xr-x | tests/tail-2/start-middle | 4 | ||||
-rwxr-xr-x | tests/tail-2/tail-n0f | 4 |
9 files changed, 15 insertions, 42 deletions
diff --git a/tests/tail-2/Makefile.am b/tests/tail-2/Makefile.am deleted file mode 100644 index 6ec142e9d..000000000 --- a/tests/tail-2/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Make coreutils tests for "tail". -*-Makefile-*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -EXTRA_DIST = $(TESTS) - -TESTS = \ - append-only \ - tail-n0f \ - infloop-1 \ - big-4gb proc-ksyms start-middle assert assert-2 - -include $(top_srcdir)/tests/check.mk diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only index 615401874..e061b125e 100755 --- a/tests/tail-2/append-only +++ b/tests/tail-2/append-only @@ -2,7 +2,7 @@ # Ensure that tail -f works on an append-only file # Requires root access to do chattr +a, as well as an ext[23] or xfs file system -# 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then tail --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh require_root_ chattr_a_works=1 diff --git a/tests/tail-2/assert b/tests/tail-2/assert index 78e0082b4..88371c2d1 100755 --- a/tests/tail-2/assert +++ b/tests/tail-2/assert @@ -29,7 +29,7 @@ if test "$VERBOSE" = yes; then fi # Not "expensive" per se, but sleeping for so long is annoying. -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh very_expensive_ ok='ok ok ok' diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2 index 6d30a665a..4cfd6fbb2 100755 --- a/tests/tail-2/assert-2 +++ b/tests/tail-2/assert-2 @@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then fi # Not "expensive" per se, but sleeping for so long is annoying. -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh very_expensive_ ok='ok ok ok' diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb index 27319f98c..b7d25289c 100755 --- a/tests/tail-2/big-4gb +++ b/tests/tail-2/big-4gb @@ -2,7 +2,7 @@ # Demonstrate a bug in `tail -cN' when operating on files of size 4G and larger # Fixed in coreutils-4.5.2. -# Copyright (C) 2002, 2003, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 tail --version fi -. $srcdir/../expensive -. $srcdir/../test-lib.sh +. $top_srcdir/tests/expensive +. $top_srcdir/tests/test-lib.sh # Create a file of size exactly 4GB (2^32) with 8 bytes # at the beginning and another set of 8 bytes at the end. diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1 index eb95ea090..4015fcb06 100755 --- a/tests/tail-2/infloop-1 +++ b/tests/tail-2/infloop-1 @@ -1,7 +1,7 @@ #!/bin/sh # This test would fail with tail from pre-1.22i textutils. -# Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1999, 2002, 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 tail --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh yes > t & yes_pid=$! diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms index 4a1a17662..ccd4fdccc 100755 --- a/tests/tail-2/proc-ksyms +++ b/tests/tail-2/proc-ksyms @@ -1,7 +1,7 @@ #!/bin/sh # Prior to textutils-2.0.17, `tail /proc/ksyms' would segfault on Linux. -# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then tail --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh fail=0 diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle index 7e62a4073..d11eaec60 100755 --- a/tests/tail-2/start-middle +++ b/tests/tail-2/start-middle @@ -2,7 +2,7 @@ # Verify that tail works even when it's reading from a file # that is not at its beginning. Based on a report from John Roll. -# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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,7 +22,7 @@ if test "$VERBOSE" = yes; then tail --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh (echo 1; echo 2) > k || framework_failure diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index 3e3bc1ce7..c07b30c49 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -2,7 +2,7 @@ # Make sure that `tail -n0 -f' and `tail -c0 -f' sleep # rather than doing what amounted to a busy-wait. -# 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 @@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then tail --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh sleep 2 & pid=$! |