summaryrefslogtreecommitdiff
path: root/t/parallel-tests-exit-status-reported.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2015-01-05 21:54:00 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2015-01-05 21:57:05 +0100
commit0504f991102aebb57fb31e4d7c85a1f2d7ea8006 (patch)
treebb717ca1b71132a8f36526ec4be563f8e54144ea /t/parallel-tests-exit-status-reported.sh
parentb8aa9fc0ce8d411be4451022e4b14d0f4238a9d9 (diff)
parentdb43dd473361d90d8b00362cfef5bac8e722000d (diff)
downloadautomake-0504f991102aebb57fb31e4d7c85a1f2d7ea8006.tar.gz
Merge branch 'minor' into micro after 1.15 release
And bump version number: 1.15 -> 1.15.0a * minor: release: stable minor release 1.15 NEWS: minor improvements and fixed some typos and grammaros docs: "make distcheck" implementation details are not to be abused NEWS: improve and adjust in light of the oncoming 1.15 release Fix dumb logic error preventing $install_sh from being be overridden Expose automake bug#19311 build: fix race in parallel builds init: ensure $ac_aux_dir is defined before being used plans: enabling subdir-object by default is blocked on bug#13928 maint: update copyright years maint: sync files from upstream ("make fetch") Typofixes in warning messages and manual NEWS: a typofix, and better word wrapping parallel-tests: avoid possible implicit "make all" in test-suite.log rule Allow user to extend .PRECIOUS target cosmetics: remove a couple of extra trailing white spaces tests: fix a spurious failure on Mac OS X docs: make clear the JAVA primary is frozen install-sh: a slightly better diagnostic, and tests enhancements install-sh: be stricter in catching invalid usages tests: more significant names for some tests tests: some cosmetic fixes tests: more significant names for a test docs: drop a few obsolescent FIXME/TODO comments, and associated text testsuite harness: report test exit status in log file TAP driver: no need to invoke AC_PROG_AWK directly TAP driver: remove perl implementation (move it into contrib/) NEWS: stop reporting "new" Automake versioning scheme cosmetics: untabify the install-sh script install-sh: assume that "set -f" and "set +f" work... install-sh: assume ${var:-value} works as expected install-sh: assume 'dirname' is available and working correctly post-release: micro version bump (1.14a) Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/parallel-tests-exit-status-reported.sh')
-rw-r--r--t/parallel-tests-exit-status-reported.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/t/parallel-tests-exit-status-reported.sh b/t/parallel-tests-exit-status-reported.sh
new file mode 100644
index 000000000..691c15c3a
--- /dev/null
+++ b/t/parallel-tests-exit-status-reported.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2013-2014 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The exit status of a test should be reported in the test logs, so
+# that one can see at a glance whether the test has succeeded or failed,
+# without having to look also into the corresponding .trs file.
+# See automake bug#11814.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+echo XFAIL_TESTS = t3.test t00.test > Makefile.am
+echo TESTS = t00.test >> Makefile.am
+for s in 0 1 2 3 5 77 78 99 100 126 127; do
+ echo "TESTS += t${s}.test" >> Makefile.am
+ cat > t${s}.test <<END
+#!/bin/sh
+printf "%s\\n%s\\n" 'random' 'will exit with status $s'
+exit $s
+END
+done
+cp t0.test t00.test
+
+chmod a+x *.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+run_make -e FAIL check
+ls -l # For debugging.
+
+match_result ()
+{
+ cat "$1.log" # For debugging.
+ test $(wc -l <"$1.log") -eq 3
+ sed -n '$p' "$1.log" | grep "^$2 $1\\.test (exit status: $3)$"
+}
+
+match_result t0 PASS 0
+match_result t00 XPASS 0
+match_result t1 FAIL 1
+match_result t2 FAIL 2
+match_result t3 XFAIL 3
+match_result t5 FAIL 5
+match_result t77 SKIP 77
+match_result t78 FAIL 78
+match_result t99 ERROR 99
+match_result t100 FAIL 100
+match_result t126 FAIL 126
+match_result t127 FAIL 127
+
+: