packaging: Bump to 1.14.1
[platform/upstream/automake.git] / t / parallel-tests-no-color-in-log.sh
old mode 100755 (executable)
new mode 100644 (file)
index 16c0ed7..9665016
@@ -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
 
 # Colorized output from the testsuite report shouldn't end up in log files.
 
-. ./defs || Exit 1
-
-esc='\e'
-
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$esc" | $FGREP "$esc"` in
-  "$esc") ;;
-# Creative quoting below to please maintainer-check.
-  *) echo "$me: f""grep can't parse nonprinting characters" >&2; Exit 77;;
-esac
+required='grep-nonprint'
+. test-init.sh
 
 TERM=ansi; export TERM
 
@@ -42,13 +32,12 @@ TESTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
 END
 
-# Creative quoting to please maintainer-check.
-echo exit '0' > pass
-echo exit '0' > xpass
-echo exit '1' > fail
-echo exit '1' > xfail
-echo exit '77' > skip
-echo exit '99' > error
+echo 'exit 0' > pass
+echo 'exit 0' > xpass
+echo 'exit 1' > fail
+echo 'exit 1' > xfail
+echo 'exit 77' > skip
+echo 'exit 99' > error
 
 $ACLOCAL
 $AUTOCONF
@@ -56,7 +45,9 @@ $AUTOMAKE --add-missing
 
 ./configure
 mv config.log config-log # Avoid possible false positives below.
-AM_COLOR_TESTS=always $MAKE -e check && Exit 1
-$FGREP "$esc" *.log && Exit 1
+run_make -e FAIL AM_COLOR_TESTS=always check
+# Not a useless use of cat; see above comments "grep-nonprinting"
+# requirement in 'test-init.sh'.
+cat *.log | grep "$esc" && exit 1
 
 :