summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-05-01 23:01:40 +0200
committerJim Meyering <meyering@redhat.com>2008-05-06 08:21:29 +0200
commit62ebe4dabdb70088ea512fb51bcffedda4a8dde8 (patch)
tree408eba8ed54d58c00b6ed3705fb14c8fbbdfd47d /tests
parentcca51697aa3627b7b920567758df306d053f9ec4 (diff)
downloadcoreutils-62ebe4dabdb70088ea512fb51bcffedda4a8dde8.tar.xz
tests: hoist envvar-check so it is run for every test
I.e., also for Perl-based tests; not just the ones using test-lib.sh. * tests/check.mk (TESTS_ENVIRONMENT): Source envvar-check here, ... * tests/test-lib.sh: ...not here.
Diffstat (limited to 'tests')
-rw-r--r--tests/check.mk5
-rwxr-xr-xtests/du/basic1
-rw-r--r--tests/test-lib.sh2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/check.mk b/tests/check.mk
index abe03afcf..21a827364 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -43,8 +43,11 @@ check: vc_exe_in_TESTS
built_programs = \
(cd $(top_builddir)/src && MAKEFLAGS= $(MAKE) -s built_programs.list)
-# Append this, because automake does the same.
+# Note that the first line is a statement. It ensures that environment
+# variables that can perturb tests are unset. The rest are envvar settings
+# that propagate build-related Makefile variables to test scripts.
TESTS_ENVIRONMENT = \
+ . $(top_srcdir)/tests/envvar-check; \
LOCALE_FR='$(LOCALE_FR)' \
abs_top_builddir='$(abs_top_builddir)' \
abs_top_srcdir='$(abs_top_srcdir)' \
diff --git a/tests/du/basic b/tests/du/basic
index f2eeccf5b..6833495e4 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -21,7 +21,6 @@ if test "$VERBOSE" = yes; then
du --version
fi
-# DU_BLOCK_SIZE could cause problems
. $top_srcdir/tests/lang-default
. $top_srcdir/tests/test-lib.sh
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 78ac97dd2..acdcbfb9c 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -208,8 +208,6 @@ test_dir_=$(pwd)
this_test_() { echo "./$0" | sed 's,.*/,,'; }
this_test=$(this_test_)
-. $top_srcdir/tests/envvar-check
-
# This is a stub function that is run upon trap (upon regular exit and
# interrupt). Override it with a per-test function, e.g., to unmount
# a partition, or to undo any other global state changes.