Merge branch 'improve-release-process' into maint
[automake.git] / t / tap-global-log.sh
blob31e1ccb4f7936c9329536791ac5fb72530fa458b
1 #! /bin/sh
2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # TAP support:
18 # - which log files get copied in the global log?
20 . ./defs || exit 1
22 . tap-setup.sh
24 cat > ok.test << 'END'
25 1..5
26 ok 1
27 ok 2
28 ok 3
29 not seen in global log
30 ok 4
31 ok 5
32 END
34 cat > top << 'END'
35 1..6
36 ok 1
37 ok 2
38 ok 3
39 END
41 cat > bot << 'END'
42 ok 5
43 ok 6
44 END
46 cat top - bot > skip.test << 'END'
47 ok # SKIP
48 ::skip::
49 END
51 cat top - bot > todo.test << 'END'
52 not ok # TODO
53 ::todo::
54 END
56 cat top - bot > fail.test << 'END'
57 not ok
58 ::fail::
59 END
61 cat top - bot > xpass.test << 'END'
62 ok # TODO
63 ::xpass::
64 END
66 cat top - bot > bail.test << 'END'
67 ::bail::
68 Bail out!
69 END
71 cat top - bot > error.test << 'END'
72 ::error::
73 1..7
74 END
76 # Created with "dd if=/dev/urandom count=1 | base64-encode"
77 cat > hodgepodge <<'END'
78 1+0 records in
79 1+0 records out
80 512 bytes (512 B) copied, 0.000241092 s, 2.1 MB/s
81 gdivnV4VhL4DOzhE3zULJuun3PwqqQqMdATVcZbIQkNgyRvNBoqqHMBQEs7QsjDbp2nK+Szz
82 EcelGyvXmHrW7yImaom6Yrg95k31VCmp/pGDRnTDwDrcOPJiv9jDReEmTAQkPuqLO+mFNly+
83 DDHM9fNbzGumstsQ3wq3DOXz1pCV3JXwhjeaHSboeEbmr55bX0XHLSKaecctA0rXDXEyZWZ/
84 ODlawSrAXzw0H7a+xBwjnNXZ3zYiwk3x+WQrPqNjb+qXiLLTxAKzx2/KnaFhxkPlte5jPRNB
85 FciDolL+H/10LsCdSzLOrGnY2zH6vL2JMZfxjnb73zWFcdWWE01LTD7wpN5O1MP3+N47lcVe
86 lWbkD04cJvhwxLElYSO24B743GG5EyGYt9SeZRE6xbgwq3fVOS8KqjwGxwi4adSBTtw0CV8W
87 S/6n8dck1vBvjA+qpk0zMSYSqc3+jzW9UiGTmTEIwfw80p/lGNsfjcNBJ86nFkWUnHmrsi8k
88 Dv57sK70mTg239g08f5Uvdga/5UreMBSgB0hUj5sbq57r7B1fsVr0Kag468la8zKy3ZEZ0gX
89 ++sbaJ9WGHhnKvjooeH+4Y6HwAFsdINde++FlCmp4EuNKKEEuXbSKLaOTy3+6pJ2DYdvRCL+
90 frZwxH4hcrw8qh+8IakB02viewZS/qT57v4=
91 END
93 exec 5>misc.test
94 echo 'ok # SKIP' >&5
95 cat hodgepodge >&5
96 echo 'not ok # TODO' >&5
97 echo 'ok' >&5
98 exec 5>&-
100 cat > skipall.test << 'END'
101 1..0 # SKIP all
104 # We don't care about the exit status of "make check" here.
105 TESTS="$(echo *.test)" $MAKE -e check || :
106 cat test-suite.log
108 grep ':.*ok|not seen' test-suite.log && exit 1
110 for s in skip todo fail xpass bail error; do
111 $FGREP "::$s::" test-suite.log
112 done
114 grep '^1\.\.0 # SKIP all$' test-suite.log
116 test_suite_contents=$(cat test-suite.log)
117 hodgepodge_contents=$(cat hodgepodge)
118 case $test_suite_contents in
119 *"$hodgepodge_contents"*) ;;
120 *) exit 1;;
121 esac