From 32b84c9c906764f392669bd9ed58fd134e1947b3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 4 May 2008 12:23:28 +0200 Subject: 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. --- build-aux/check.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build-aux') 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 \ -- cgit v1.2.3-70-g09d2