X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Ftap-color.sh;h=409663ebcc50c96ff76d87f5da26d397affde3b7;hb=a7c00e1935726a32dca6871dd0f1b7eda28d0a5b;hp=5a8e1bc3755a7623334732e2397623d533388fd6;hpb=9465eb2651d9af30519882c4b583acc8ce91b8bb;p=platform%2Fupstream%2Fautomake.git diff --git a/t/tap-color.sh b/t/tap-color.sh old mode 100755 new mode 100644 index 5a8e1bc..409663e --- a/t/tap-color.sh +++ b/t/tap-color.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 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 @@ -18,7 +18,7 @@ # - colorization of TAP results and diagnostic messages required='grep-nonprint' -. ./defs || Exit 1 +. test-init.sh # Escape '[' for grep, below. red="$esc\[0;31m" @@ -36,7 +36,7 @@ TESTS = all.test skip.test bail.test badplan.test noplan.test \ few.test many.test order.test afterlate.test END -. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh" +. tap-setup.sh cat > all.test << 'END' 1..5 @@ -142,24 +142,22 @@ test_no_color () cat stdout | grep '====' cat stdout | grep '[Ss]ee .*test-suite\.log' cat stdout | grep '[Tt]estsuite summary' - ) | grep "$esc" && Exit 1 + ) | grep "$esc" && exit 1 : For shells with broken 'set -e' else - cat stdout | grep "$esc" && Exit 1 + cat stdout | grep "$esc" && exit 1 : For shells with broken 'set -e' fi } # Forced colorization should take place also with non-ANSI terminals; # hence the "TERM=dumb" definition. -TERM=dumb AM_COLOR_TESTS=always $MAKE check >stdout \ - && { cat stdout; Exit 1; } -cat stdout +AM_COLOR_TESTS=always; export AM_COLOR_TESTS +run_make -O -e FAIL TERM=dumb check test_color -TERM=ansi $MAKE -e check >stdout \ - && { cat stdout; Exit 1; } -cat stdout +unset AM_COLOR_TESTS +run_make -O -e FAIL TERM=ansi check test_no_color :