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/touch/dangling-symlink | 2 +- tests/touch/dir-1 | 2 +- tests/touch/empty-file | 2 +- tests/touch/fail-diag | 6 +++--- tests/touch/fifo | 2 +- tests/touch/no-create-missing | 4 ++-- tests/touch/no-rights | 2 +- tests/touch/not-owner | 4 ++-- tests/touch/now-owned-by-other | 4 ++-- tests/touch/obsolescent | 4 ++-- tests/touch/read-only | 4 ++-- tests/touch/relative | 4 ++-- 12 files changed, 20 insertions(+), 20 deletions(-) (limited to 'tests/touch') diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index c69f9d9bc..66392a5fc 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh rm -f touch-target t-symlink ln -s touch-target t-symlink diff --git a/tests/touch/dir-1 b/tests/touch/dir-1 index 5b7a86c19..e48484a2a 100755 --- a/tests/touch/dir-1 +++ b/tests/touch/dir-1 @@ -7,7 +7,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh fail=0 touch . || fail=1 diff --git a/tests/touch/empty-file b/tests/touch/empty-file index 5368629b4..1020a378d 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh DEFAULT_SLEEP_SECONDS=2 SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index 018d191e5..7177ad444 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -1,7 +1,7 @@ #!/bin/sh # make sure touch gives reasonable diagnostics -# 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,8 +21,8 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh skip_if_root_ d1=no-$$ diff --git a/tests/touch/fifo b/tests/touch/fifo index 5dd084065..22cde83a7 100755 --- a/tests/touch/fifo +++ b/tests/touch/fifo @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh mkfifo_or_skip_ fifo diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing index 79a2452e3..a503ff752 100755 --- a/tests/touch/no-create-missing +++ b/tests/touch/no-create-missing @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that touch -c no-such-file no longer fails (it did in 4.1.8). -# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh fail=0 diff --git a/tests/touch/no-rights b/tests/touch/no-rights index e90fcac50..9466166ce 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh # Make sure t2 is newer than t1. touch -d '2000-01-01 00:00' t1 || framework_failure diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 3f133f1e3..d041531c5 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/lang-default +. $top_srcdir/tests/test-lib.sh if env -- test -w /; then skip_test_ you have write access to /. diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other index d4e01dd27..7aaa4f3a0 100755 --- a/tests/touch/now-owned-by-other +++ b/tests/touch/now-owned-by-other @@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../envvar-check -. $srcdir/../test-lib.sh +. $top_srcdir/tests/envvar-check +. $top_srcdir/tests/test-lib.sh require_root_ group_num=$(id -g $NON_ROOT_USERNAME) diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent index dc1008d10..25f73828a 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -1,7 +1,7 @@ #!/bin/sh # Test touch with obsolescent 8- or 10-digit time stamps. -# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh _POSIX2_VERSION=199209; export _POSIX2_VERSION POSIXLY_CORRECT=1; export POSIXLY_CORRECT diff --git a/tests/touch/read-only b/tests/touch/read-only index e1389c280..47b7eb20d 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -1,7 +1,7 @@ #!/bin/sh # ensure that touch can operate on read-only files -# Copyright (C) 2005-2007 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh skip_if_root_ : > read-only || framework_failure diff --git a/tests/touch/relative b/tests/touch/relative index 910a3782c..6a5d100f1 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -2,7 +2,7 @@ # Demonstrate using a combination of --reference and --date to # set the time of a file back by an arbitrary amount. -# 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,7 +22,7 @@ if test "$VERBOSE" = yes; then touch --version fi -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure -- cgit v1.2.3-54-g00ecf