diff options
author | Jim Meyering <meyering@redhat.com> | 2008-05-04 12:23:28 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-05-06 08:21:30 +0200 |
commit | 32b84c9c906764f392669bd9ed58fd134e1947b3 (patch) | |
tree | cb27bce81ed6e4e837e74f896569c7a1f8317807 /build-aux | |
parent | 1f3e96480213ba2b2d809593cd1448e2f99e4595 (diff) | |
download | coreutils-32b84c9c906764f392669bd9ed58fd134e1947b3.tar.xz |
tests: save and restore TERM around use of TESTS_ENVIRONMENT,
now that TESTS_ENVIRONMENT unsets it.
* check.mk (am__check_pre): Save $TERM.
(am__check_post): Restore saved value of TERM and export.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/check.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build-aux/check.mk b/build-aux/check.mk index 9d909c6f1..9cd1b3397 100644 --- a/build-aux/check.mk +++ b/build-aux/check.mk @@ -100,6 +100,8 @@ _dirname = \ # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $src, and passes TESTS_ENVIRONMENT. +# Save and restore TERM around use of TESTS_ENVIRONMENT, +# in case that unsets it. am__check_pre = \ $(SH_E_WORKAROUND); \ tst=`echo "$$src" | sed 's|^.*/||'`; \ @@ -110,6 +112,7 @@ $(mkdir_p) "$$(echo '$@'|$(_dirname))" || exit; \ if test -f "./$$src"; then dir=./; \ elif test -f "$$src"; then dir=; \ else dir="$(srcdir)/"; fi; \ +__SAVED_TERM=$$TERM; \ $(TESTS_ENVIRONMENT) $(SHELL) # To be appended to the command running the test. Handles the stdout @@ -120,6 +123,7 @@ estatus=$$?; \ if test $$estatus -eq 177; then \ $(ENABLE_HARD_ERRORS) || estatus=1; \ fi; \ +TERM=$$__SAVED_TERM; export TERM; \ $(am__tty_colors); \ xfailed=PASS; \ for xfail in : $(XFAIL_TESTS); do \ |