diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am.in | 3 | ||||
-rw-r--r-- | tests/check.mk | 23 | ||||
-rw-r--r-- | tests/chgrp/Makefile.am | 4 | ||||
-rw-r--r-- | tests/chmod/Makefile.am | 3 | ||||
-rw-r--r-- | tests/chown/Makefile.am | 3 | ||||
-rw-r--r-- | tests/cp/Makefile.am | 5 | ||||
-rw-r--r-- | tests/dd/Makefile.am | 6 | ||||
-rwxr-xr-x | tests/dd/skip-seek | 2 | ||||
-rw-r--r-- | tests/du/Makefile.am | 4 | ||||
-rw-r--r-- | tests/install/Makefile.am | 4 | ||||
-rw-r--r-- | tests/ln/Makefile.am | 3 | ||||
-rw-r--r-- | tests/ls/Makefile.am | 5 | ||||
-rw-r--r-- | tests/misc/Makefile.am | 10 | ||||
-rwxr-xr-x | tests/misc/pwd-long | 7 | ||||
-rw-r--r-- | tests/mkdir/Makefile.am | 3 | ||||
-rw-r--r-- | tests/mv/Makefile.am | 7 | ||||
-rwxr-xr-x | tests/mv/i-1 | 4 | ||||
-rw-r--r-- | tests/readlink/Makefile.am | 3 | ||||
-rw-r--r-- | tests/rm/Makefile.am | 8 | ||||
-rwxr-xr-x | tests/rm/empty-name | 4 | ||||
-rwxr-xr-x | tests/rm/unreadable | 2 | ||||
-rw-r--r-- | tests/rmdir/Makefile.am | 5 | ||||
-rw-r--r-- | tests/tail-2/Makefile.am | 6 | ||||
-rw-r--r-- | tests/touch/Makefile.am | 4 |
24 files changed, 27 insertions, 101 deletions
diff --git a/tests/Makefile.am.in b/tests/Makefile.am.in index afee6ffe1..c613cf555 100644 --- a/tests/Makefile.am.in +++ b/tests/Makefile.am.in @@ -21,9 +21,6 @@ EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen) noinst_SCRIPTS = $x-tests -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g' diff --git a/tests/check.mk b/tests/check.mk index 8e54c6f20..aad6433db 100644 --- a/tests/check.mk +++ b/tests/check.mk @@ -32,12 +32,23 @@ check: vc_exe_in_TESTS .PHONY: vc_exe_in_TESTS # Append this, because automake does the same. -TESTS_ENVIRONMENT += \ - top_srcdir=$(top_srcdir) \ - PACKAGE_VERSION=$(PACKAGE_VERSION) \ - abs_top_srcdir=$(abs_top_srcdir) \ - abs_top_builddir=$(abs_top_builddir) \ - srcdir=$(srcdir) +TESTS_ENVIRONMENT = \ + abs_top_builddir='$(abs_top_builddir)' \ + abs_top_srcdir='$(abs_top_srcdir)' \ + built_programs="`$(built_programs)`" \ + host_os=$(host_os) \ + host_triplet='$(host_triplet)' \ + srcdir='$(srcdir)' \ + top_srcdir='$(top_srcdir)' \ + CONFIG_HEADER='$(CONFIG_HEADER)' \ + CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ + EGREP='$(EGREP)' \ + EXEEXT='$(EXEEXT)' \ + MAKE=$(MAKE) \ + PACKAGE_VERSION=$(PACKAGE_VERSION) \ + PERL='$(PERL)' \ + REPLACE_GETCWD=$(REPLACE_GETCWD) \ + PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" TEST_LOGS = $(TESTS:=.log) diff --git a/tests/chgrp/Makefile.am b/tests/chgrp/Makefile.am index 8fc5f6876..3033e1b7b 100644 --- a/tests/chgrp/Makefile.am +++ b/tests/chgrp/Makefile.am @@ -8,9 +8,5 @@ TESTS = \ recurse EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - host_triplet=$(host_triplet) \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/chmod/Makefile.am b/tests/chmod/Makefile.am index 8fb595a79..a0e0053a0 100644 --- a/tests/chmod/Makefile.am +++ b/tests/chmod/Makefile.am @@ -12,8 +12,5 @@ TESTS = \ usage EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/chown/Makefile.am b/tests/chown/Makefile.am index e0017c1be..c154279e2 100644 --- a/tests/chown/Makefile.am +++ b/tests/chown/Makefile.am @@ -5,8 +5,5 @@ TESTS = \ deref \ separator EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/cp/Makefile.am b/tests/cp/Makefile.am index 83e2126de..1fbdc3f67 100644 --- a/tests/cp/Makefile.am +++ b/tests/cp/Makefile.am @@ -33,10 +33,5 @@ TESTS = \ 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 -TESTS_ENVIRONMENT = \ - MAKE=$(MAKE) \ - CONFIG_HEADER=$(CONFIG_HEADER) \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/dd/Makefile.am b/tests/dd/Makefile.am index 26c26ada7..afc17e83f 100644 --- a/tests/dd/Makefile.am +++ b/tests/dd/Makefile.am @@ -2,12 +2,6 @@ EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - PERL="$(PERL)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - PROG=dd - TESTS = \ misc not-rewound skip-seek skip-seek2 unblock-sync diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek index 9f82a75fd..a30195e92 100755 --- a/tests/dd/skip-seek +++ b/tests/dd/skip-seek @@ -91,7 +91,7 @@ my @Tests = my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; +my $prog = 'dd'; my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); exit $fail; EOF diff --git a/tests/du/Makefile.am b/tests/du/Makefile.am index badc0c98d..9fd6f9df7 100644 --- a/tests/du/Makefile.am +++ b/tests/du/Makefile.am @@ -30,9 +30,5 @@ TESTS = \ hard-link 8gb basic restore-wd \ exclude no-x no-deref trailing-slash deref two-args slink EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - PERL="$(PERL)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/install/Makefile.am b/tests/install/Makefile.am index 5714bcf35..0ff078485 100644 --- a/tests/install/Makefile.am +++ b/tests/install/Makefile.am @@ -6,9 +6,5 @@ TESTS = \ trap EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - EXEEXT='$(EXEEXT)' \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/ln/Makefile.am b/tests/ln/Makefile.am index 87aadf6f7..8fe7b4725 100644 --- a/tests/ln/Makefile.am +++ b/tests/ln/Makefile.am @@ -3,8 +3,5 @@ TESTS = \ hard-backup target-1 sf-1 misc backup-1 EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am index 9f6e3c7be..2aea41951 100644 --- a/tests/ls/Makefile.am +++ b/tests/ls/Makefile.am @@ -26,10 +26,5 @@ TESTS = \ stat-vs-dirent x-option EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - PERL="$(PERL)" \ - PROG=ls include $(top_srcdir)/tests/check.mk diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am index 7f5de4467..7425a6b07 100644 --- a/tests/misc/Makefile.am +++ b/tests/misc/Makefile.am @@ -20,16 +20,6 @@ EXTRA_DIST = $(TESTS) built_programs = \ (cd $(top_builddir)/src && MAKEFLAGS= $(MAKE) -s built_programs.list) -TESTS_ENVIRONMENT = \ - built_programs="`$(built_programs)`" \ - PERL="$(PERL)" \ - BUILD_SRC_DIR="`pwd`/../../src" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - CONFIG_HEADER=$(CONFIG_HEADER) \ - REPLACE_GETCWD=$(REPLACE_GETCWD) \ - host_os=$(host_os) - # Do not choose a name that is a shell keyword like 'if', or a # commonly-used utility like 'cat' or 'test', as the name of a test. # Otherwise, VPATH builds will fail on hosts like Solaris, since they diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long index 42a092c24..5e5b5ad5d 100755 --- a/tests/misc/pwd-long +++ b/tests/misc/pwd-long @@ -79,9 +79,10 @@ do } until (++$i == $n); -my $build_src_dir = $ENV{BUILD_SRC_DIR}; -$build_src_dir - or die "$ME: envvar BUILD_SRC_DIR not defined\n"; +my $abs_top_builddir = $ENV{abs_top_builddir}; +$abs_top_builddir + or die "$ME: envvar abs_top_builddir not defined\n"; +my $build_src_dir = "$abs_top_builddir/src"; if ($build_src_dir !~ m!^([-+.:/\w]+)$!) { warn "$0: skipping this test; odd build source directory name:\n" diff --git a/tests/mkdir/Makefile.am b/tests/mkdir/Makefile.am index 8a8db6c9d..617abcfd1 100644 --- a/tests/mkdir/Makefile.am +++ b/tests/mkdir/Makefile.am @@ -13,8 +13,5 @@ TESTS = \ writable-under-readonly EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am index ba5d41d98..c1219113e 100644 --- a/tests/mv/Makefile.am +++ b/tests/mv/Makefile.am @@ -48,12 +48,5 @@ TESTS = \ part-symlink part-rename trailing-slash EXTRA_DIST = $(TESTS) vfat -TESTS_ENVIRONMENT = \ - PERL="$(PERL)" \ - EGREP="$(EGREP)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - CONFIG_HEADER=$(CONFIG_HEADER) \ - PROG=mv include $(top_srcdir)/tests/check.mk diff --git a/tests/mv/i-1 b/tests/mv/i-1 index 7e292f097..d51685921 100755 --- a/tests/mv/i-1 +++ b/tests/mv/i-1 @@ -1,7 +1,7 @@ #!/bin/sh # Make sure a `n' reply to `mv -i...' aborts the move operation. -# Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005-2007 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 @@ -51,7 +51,7 @@ my @Tests = my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; +my $prog = 'mv'; my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); exit $fail; EOF diff --git a/tests/readlink/Makefile.am b/tests/readlink/Makefile.am index 3a2e1f399..54a975896 100644 --- a/tests/readlink/Makefile.am +++ b/tests/readlink/Makefile.am @@ -3,8 +3,5 @@ TESTS = \ rl-1 can-e can-f can-m EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk diff --git a/tests/rm/Makefile.am b/tests/rm/Makefile.am index 0f760066a..6b6595958 100644 --- a/tests/rm/Makefile.am +++ b/tests/rm/Makefile.am @@ -43,13 +43,5 @@ TESTS = \ isatty EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - RM=../../src/rm \ - MKDIR=../../src/mkdir \ - CONFIG_HEADER=$(CONFIG_HEADER) \ - PERL="$(PERL)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - PROG=rm include $(top_srcdir)/tests/check.mk diff --git a/tests/rm/empty-name b/tests/rm/empty-name index b709dff1d..ead842245 100755 --- a/tests/rm/empty-name +++ b/tests/rm/empty-name @@ -1,7 +1,7 @@ #!/bin/sh # Make sure that rm -r '' fails. -# Copyright (C) 1998, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 1998, 2003, 2005, 2007 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 @@ -40,7 +40,7 @@ use strict; # Turn off localisation of executable's ouput. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; -my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; +my $prog = 'rm'; my @Tests = ( diff --git a/tests/rm/unreadable b/tests/rm/unreadable index 66a59515c..2fbe0320d 100755 --- a/tests/rm/unreadable +++ b/tests/rm/unreadable @@ -37,7 +37,7 @@ use strict; my $d = "dir-$$"; my $mkdir = {PRE => sub {mkdir $d,0100 or die "$d: $!\n"}}; -my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; +my $prog = 'rm'; my @Tests = ( diff --git a/tests/rmdir/Makefile.am b/tests/rmdir/Makefile.am index 4e73c7338..72397f0d9 100644 --- a/tests/rmdir/Makefile.am +++ b/tests/rmdir/Makefile.am @@ -3,10 +3,5 @@ TESTS = \ fail-perm ignore t-slash EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - PERL="$(PERL)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - PROG=rmdir include $(top_srcdir)/tests/check.mk diff --git a/tests/tail-2/Makefile.am b/tests/tail-2/Makefile.am index da9909044..6ec142e9d 100644 --- a/tests/tail-2/Makefile.am +++ b/tests/tail-2/Makefile.am @@ -18,12 +18,6 @@ EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - PERL="$(PERL)" \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ - PROG=tail - TESTS = \ append-only \ tail-n0f \ diff --git a/tests/touch/Makefile.am b/tests/touch/Makefile.am index 6978a51b4..d17213d39 100644 --- a/tests/touch/Makefile.am +++ b/tests/touch/Makefile.am @@ -22,9 +22,5 @@ TESTS = \ no-create-missing \ fail-diag dir-1 dangling-symlink empty-file fifo no-rights obsolescent EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = \ - host_triplet=$(host_triplet) \ - CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \ - PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" include $(top_srcdir)/tests/check.mk |