From 512e111a926fedbd7dc7b0875ab837dbb7d2a7a6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 17 Apr 2008 23:34:45 +0200 Subject: 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. --- tests/cp/Makefile.am | 40 ---------------------------------------- tests/cp/abuse | 8 ++++---- tests/cp/acl | 4 ++-- tests/cp/backup-1 | 4 ++-- tests/cp/backup-dir | 4 ++-- tests/cp/backup-is-src | 6 +++--- tests/cp/cp-HL | 4 ++-- tests/cp/cp-a-selinux | 4 ++-- tests/cp/cp-deref | 4 ++-- tests/cp/cp-i | 6 +++--- tests/cp/cp-mv-backup | 6 +++--- tests/cp/cp-parents | 6 +++--- tests/cp/deref-slink | 6 +++--- tests/cp/dir-rm-dest | 4 ++-- tests/cp/dir-slash | 4 ++-- tests/cp/dir-vs-file | 4 ++-- tests/cp/existing-perm-race | 6 +++--- tests/cp/fail-perm | 6 +++--- tests/cp/file-perm-race | 4 ++-- tests/cp/into-self | 6 +++--- tests/cp/link | 4 ++-- tests/cp/link-no-deref | 4 ++-- tests/cp/link-preserve | 6 +++--- tests/cp/no-deref-link1 | 4 ++-- tests/cp/no-deref-link2 | 4 ++-- tests/cp/no-deref-link3 | 4 ++-- tests/cp/parent-perm | 4 ++-- tests/cp/parent-perm-race | 4 ++-- tests/cp/perm | 4 ++-- tests/cp/preserve-2 | 4 ++-- tests/cp/preserve-gid | 6 +++--- tests/cp/proc-zero-len | 4 ++-- tests/cp/r-vs-symlink | 4 ++-- tests/cp/same-file | 6 +++--- tests/cp/slink-2-slink | 6 +++--- tests/cp/sparse | 6 +++--- tests/cp/special-bits | 4 ++-- tests/cp/special-f | 6 +++--- tests/cp/src-base-dot | 4 ++-- tests/cp/symlink-slash | 6 +++--- tests/cp/thru-dangling | 4 ++-- 41 files changed, 97 insertions(+), 137 deletions(-) delete mode 100644 tests/cp/Makefile.am (limited to 'tests/cp') diff --git a/tests/cp/Makefile.am b/tests/cp/Makefile.am deleted file mode 100644 index 28ebd35a6..000000000 --- a/tests/cp/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# Make coreutils tests for cp. -*-Makefile-*- - -# Copyright (C) 1997-2001, 2003, 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 -# 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 . - -TESTS = \ - special-f \ - parent-perm \ - abuse \ - proc-zero-len \ - thru-dangling \ - cp-a-selinux \ - file-perm-race parent-perm-race \ - existing-perm-race \ - backup-dir \ - src-base-dot \ - sparse \ - link-no-deref \ - cp-deref \ - acl \ - preserve-2 r-vs-symlink link-preserve preserve-gid \ - backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \ - same-file cp-mv-backup symlink-slash slink-2-slink fail-perm dir-slash \ - perm cp-HL cp-i special-bits link dir-rm-dest cp-parents deref-slink \ - dir-vs-file into-self -EXTRA_DIST = $(TESTS) trailing-slash - -include $(top_srcdir)/tests/check.mk diff --git a/tests/cp/abuse b/tests/cp/abuse index 04b10f7f6..f4f215f42 100755 --- a/tests/cp/abuse +++ b/tests/cp/abuse @@ -1,7 +1,7 @@ #!/bin/sh # ensure that cp does not write through a just-copied 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,9 +21,9 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../envvar-check -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/envvar-check +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh mkdir a b c || framework_failure ln -s ../t a/1 || framework_failure diff --git a/tests/cp/acl b/tests/cp/acl index a7f6a844f..bfea3bfd3 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -18,7 +18,7 @@ # along with this program. If not, see . # Make sure we get English translations. -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default if test "$VERBOSE" = yes; then set -x @@ -27,7 +27,7 @@ if test "$VERBOSE" = yes; then setfacl --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh require_acl_ # Skip this test if cp was built without ACL support: diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 index 882167931..6f2ca2eae 100755 --- a/tests/cp/backup-1 +++ b/tests/cp/backup-1 @@ -1,7 +1,7 @@ #!/bin/sh # Test cp backup. -# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh suffix=.b file=b1.$$ diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir index 879c5164e..d2ac2be39 100755 --- a/tests/cp/backup-dir +++ b/tests/cp/backup-dir @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that cp -b doesn't back up directories. -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir x y || framework_failure diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src index 7721be9c5..e55ede1be 100755 --- a/tests/cp/backup-is-src +++ b/tests/cp/backup-is-src @@ -1,7 +1,7 @@ #!/bin/sh # Test cp backup to source file. -# Copyright (C) 1998-2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1998-2000, 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 @@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh echo a > a || framework_failure echo a-tilde > a~ || framework_failure diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL index 6040cc94c..dbfaed1ef 100755 --- a/tests/cp/cp-HL +++ b/tests/cp/cp-HL @@ -1,7 +1,7 @@ #!/bin/sh # test cp's -H and -L options -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir src-dir dest-dir || framework_failure echo f > f || framework_failure diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux index 67894571c..8f854bd0c 100755 --- a/tests/cp/cp-a-selinux +++ b/tests/cp/cp-a-selinux @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh require_root_ require_selinux_ diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref index a666f5d6d..181ba4722 100755 --- a/tests/cp/cp-deref +++ b/tests/cp/cp-deref @@ -2,7 +2,7 @@ # cp -RL dir1 dir2' must handle the case in which each of dir1 and dir2 # contain a symlink pointing to some third directory. -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir a b c d || framework_failure ln -s ../c a || framework_failure diff --git a/tests/cp/cp-i b/tests/cp/cp-i index e7cd438aa..5aa690d86 100755 --- a/tests/cp/cp-i +++ b/tests/cp/cp-i @@ -1,7 +1,7 @@ #!/bin/sh # Test whether cp -i prompts in the right place. -# 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 cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh mkdir -p a b/a/c || framework_failure touch a/c || framework_failure diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 9a464a16d..41bc50b2f 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -1,7 +1,7 @@ #!/bin/sh # Test basic --backup functionality for both cp and mv. -# Copyright (C) 1999, 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 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,9 +22,9 @@ if test "$VERBOSE" = yes; then fi # Ensure that ls sorts the same way for everyone. -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh umask 022 diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 4500e5f48..fe62f2b15 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -2,7 +2,7 @@ # cp -R --parents dir-specified-with-trailing-slash/ other-dir # would get a failed assertion. -# Copyright (C) 2000, 2002, 2004, 2005, 2006-2007 Free Software +# Copyright (C) 2000, 2002, 2004, 2005, 2006-2008 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then mv --version fi -. $srcdir/../umask-check -. $srcdir/../test-lib.sh +. $top_srcdir/tests/umask-check +. $top_srcdir/tests/test-lib.sh # Run the setgid check from the just-created directory. . "$abs_top_srcdir/tests/setgid-check" diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink index d677d4161..dfd287161 100755 --- a/tests/cp/deref-slink +++ b/tests/cp/deref-slink @@ -2,7 +2,7 @@ # Demonstrate bug when using -d with an existing destination file # that is a symlink. -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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,8 +22,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh touch f slink-target || framework_failure ln -s slink-target slink || framework_failure diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest index 45212c748..e9934c339 100755 --- a/tests/cp/dir-rm-dest +++ b/tests/cp/dir-rm-dest @@ -1,7 +1,7 @@ #!/bin/sh # verify that cp's --remove-destination option works with -R -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir d e || framework_failure diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash index 6a6a613a3..3521a1a70 100755 --- a/tests/cp/dir-slash +++ b/tests/cp/dir-slash @@ -2,7 +2,7 @@ # Make sure that cp -R DIR1 DIR2 does the right thing # when DIR1 is written with a trailing slash. -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir dir1 dir2 || framework_failure touch dir1/file || framework_failure diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file index 58cdf5eab..cb23172cb 100755 --- a/tests/cp/dir-vs-file +++ b/tests/cp/dir-vs-file @@ -1,7 +1,7 @@ #!/bin/sh # A directory may not replace an existing file. -# 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir dir || framework_failure touch file || framework_failure diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race index 0ab10e94d..aa6d7c99a 100755 --- a/tests/cp/existing-perm-race +++ b/tests/cp/existing-perm-race @@ -1,7 +1,7 @@ #!/bin/sh # Make sure cp -p isn't too generous with existing file permissions. -# 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 cp --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/cp/fail-perm b/tests/cp/fail-perm index b52aba5f8..b5d14d62f 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2000, 2002-2007 Free Software +# Copyright (C) 2000, 2002-2008 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh skip_if_root_ chmod g-s . || framework_failure diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race index 3e3859773..09d38a734 100755 --- a/tests/cp/file-perm-race +++ b/tests/cp/file-perm-race @@ -1,7 +1,7 @@ #!/bin/sh # Make sure cp -p isn't too generous with file permissions. -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh umask 022 mkfifo fifo || diff --git a/tests/cp/into-self b/tests/cp/into-self index 7afe2a5bc..7660454a7 100755 --- a/tests/cp/into-self +++ b/tests/cp/into-self @@ -1,7 +1,7 @@ #!/bin/sh # Confirm that copying a directory into itself gets a proper diagnostic. -# 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 @@ -26,8 +26,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh mkdir dir || framework_failure diff --git a/tests/cp/link b/tests/cp/link index 26fabfda7..49cedebc4 100755 --- a/tests/cp/link +++ b/tests/cp/link @@ -2,7 +2,7 @@ # Make sure cp --link -f works when the target exists. # This failed for 4.0z (due to a bug introduced in that test release). -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh touch src || framework_failure touch dest || framework_failure diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref index 2e955a559..d249b03d8 100755 --- a/tests/cp/link-no-deref +++ b/tests/cp/link-no-deref @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that cp --link --no-dereference works properly -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh ln -s no-such-file dangling-slink || framework_failure diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve index 137bb901e..091c0a504 100755 --- a/tests/cp/link-preserve +++ b/tests/cp/link-preserve @@ -2,7 +2,7 @@ # ensure that `cp -d' preserves hard-links between command line arguments # ensure that --preserve=links works with -RH and -RL -# 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,8 +22,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh touch a || framework_failure ln a b || framework_failure diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1 index a194303c9..018a029fd 100755 --- a/tests/cp/no-deref-link1 +++ b/tests/cp/no-deref-link1 @@ -1,7 +1,7 @@ #!/bin/sh # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir a b msg=bar diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2 index e3ad0aab2..0046dce4a 100755 --- a/tests/cp/no-deref-link2 +++ b/tests/cp/no-deref-link2 @@ -1,7 +1,7 @@ #!/bin/sh # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir b msg=bar diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3 index 13841adb0..5d0ba7538 100755 --- a/tests/cp/no-deref-link3 +++ b/tests/cp/no-deref-link3 @@ -1,7 +1,7 @@ #!/bin/sh # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh msg=bar echo $msg > a diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm index 1e9e8e1ea..bca0f8769 100755 --- a/tests/cp/parent-perm +++ b/tests/cp/parent-perm @@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../envvar-check -. $srcdir/../test-lib.sh +. $top_srcdir/tests/envvar-check +. $top_srcdir/tests/test-lib.sh . $abs_srcdir/../umask-check diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race index 8afa0c0b7..de542e00d 100755 --- a/tests/cp/parent-perm-race +++ b/tests/cp/parent-perm-race @@ -1,7 +1,7 @@ #!/bin/sh # Make sure cp -pR --parents isn't too generous with parent permissions. -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh umask 002 mkdir mode ownership d || framework_failure diff --git a/tests/cp/perm b/tests/cp/perm index a31d430e0..b24221f03 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -1,7 +1,7 @@ #!/bin/sh # Make sure the permission-preserving code in copy.c (mv, cp, install) works. -# Copyright (C) 2000, 2002, 2004-2007 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then mv --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh very_expensive_ umask 037 diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2 index 36a561cde..0bbe3390c 100755 --- a/tests/cp/preserve-2 +++ b/tests/cp/preserve-2 @@ -1,7 +1,7 @@ #!/bin/sh # ensure that cp's --preserve=X,Y option is parsed properly -# Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh touch f || framework_failure diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index d78582942..ce08a60ac 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -1,7 +1,7 @@ #!/bin/sh # Verify that cp -p preserves GID when it is possible. -# Copyright (C) 2007, 2008 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 @@ -16,8 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -. "$srcdir/../lang-default" -. "$srcdir/../test-lib.sh" +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh require_root_ create() { diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len index 8330bfd28..aef5e5a62 100755 --- a/tests/cp/proc-zero-len +++ b/tests/cp/proc-zero-len @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that cp copies contents of non-empty "regular" file with st_size==0 -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh touch empty || framework_failure diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink index 579c49576..6ee237037 100755 --- a/tests/cp/r-vs-symlink +++ b/tests/cp/r-vs-symlink @@ -1,7 +1,7 @@ #!/bin/sh # cp -r should not create symlinks. Fixed in fileutils-4.1.5. -# 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 @@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh echo abc > foo || framework_failure ln -s foo slink || framework_failure diff --git a/tests/cp/same-file b/tests/cp/same-file index 908573ad3..1058b568d 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -2,7 +2,7 @@ # Test some of cp's options and how cp handles situations in # which a naive implementation might overwrite the source file. -# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2007 Free Software +# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2008 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh # Unset CDPATH. Otherwise, output from the `cd dir' command # can make this test fail. diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink index f6cc6e987..633b27eea 100755 --- a/tests/cp/slink-2-slink +++ b/tests/cp/slink-2-slink @@ -2,7 +2,7 @@ # `test cp --update A B' where A and B are both symlinks that point # to the same file -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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,8 +22,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh touch file || framework_failure ln -s file a || framework_failure diff --git a/tests/cp/sparse b/tests/cp/sparse index 3238aa9cf..dfb348db3 100755 --- a/tests/cp/sparse +++ b/tests/cp/sparse @@ -1,7 +1,7 @@ #!/bin/sh # Test cp --sparse=always -# 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 cp --version fi -. $srcdir/../sparse-file -. $srcdir/../test-lib.sh +. $top_srcdir/tests/sparse-file +. $top_srcdir/tests/test-lib.sh # Create a sparse file. # It has to be at least 128K in order to be sparse on some systems. diff --git a/tests/cp/special-bits b/tests/cp/special-bits index be090fe2a..e0f8bbb0d 100755 --- a/tests/cp/special-bits +++ b/tests/cp/special-bits @@ -2,7 +2,7 @@ # make sure `cp -p' preserves special bits # This works only when run as root. -# Copyright (C) 2000-2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000-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 @@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh require_root_ touch a b c || framework_failure diff --git a/tests/cp/special-f b/tests/cp/special-f index ebcbf8ea3..cf684e362 100755 --- a/tests/cp/special-f +++ b/tests/cp/special-f @@ -22,9 +22,9 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../envvar-check -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/envvar-check +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh mkfifo fifo || skip_test_ "fifos not supported" diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot index 274a66429..a20268be0 100755 --- a/tests/cp/src-base-dot +++ b/tests/cp/src-base-dot @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that "mkdir x y; cd y; cp -ab ../x/. ." is a successful, silent, no-op. -# 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkdir x y || framework_failure diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash index 3c13fe95d..1ace67bc6 100755 --- a/tests/cp/symlink-slash +++ b/tests/cp/symlink-slash @@ -2,7 +2,7 @@ # Make sure that cp -dR dereferences a symlink arg if its name is # written with a trailing slash. -# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 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,8 +22,8 @@ if test "$VERBOSE" = yes; then cp --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh mkdir dir || framework_failure ln -s dir symlink || framework_failure diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling index 0256a167c..aa494c597 100755 --- a/tests/cp/thru-dangling +++ b/tests/cp/thru-dangling @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that cp works as documented, when the destination is 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 cp --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh ln -s no-such dangle || framework_failure echo hi > f || framework_failure -- cgit v1.2.3-54-g00ecf