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/chgrp/Makefile.am | 12 ------------ tests/chgrp/basic | 8 ++++---- tests/chgrp/default-no-deref | 6 +++--- tests/chgrp/deref | 6 +++--- tests/chgrp/no-x | 8 ++++---- tests/chgrp/posix-H | 6 +++--- tests/chgrp/recurse | 6 +++--- 7 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 tests/chgrp/Makefile.am (limited to 'tests/chgrp') 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 -- cgit v1.2.3-70-g09d2