From: Jim Meyering Date: Sun, 4 May 2008 10:23:28 +0000 (+0200) Subject: tests: save and restore TERM around use of TESTS_ENVIRONMENT, X-Git-Tag: v6.12~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32b84c9c906764f392669bd9ed58fd134e1947b3;p=platform%2Fupstream%2Fcoreutils.git 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. --- diff --git a/build-aux/check.mk b/build-aux/check.mk index 9d909c6..9cd1b33 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 \