tests: use append mode to capture parallel make output
[platform/upstream/automake.git] / t / ax / test-defs.in
1 # -*- shell-script -*-
2 # @configure_input@
3 #
4 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 # Defines and minimal setup for Automake testing environment.
20
21 # IMPORTANT NOTES AND REQUIREMENTS
22 #   - Multiple inclusions of this file should be idempotent.
23 #   - This code has to be 'set -e' clean.
24
25 # See whether the current test script is expected to use TAP or not.
26 # Use a sensible default, while allowing the scripts to override this
27 # check.
28 if test -z "$am_test_protocol"; then
29   case $argv0 in
30     *.tap) am_test_protocol=tap;;
31         *) am_test_protocol=none;;
32   esac
33 fi
34
35 am_rel_srcdir='@srcdir@'
36 am_top_srcdir='@abs_srcdir@'
37 am_top_builddir='@abs_builddir@'
38
39 # Where testsuite-related helper scripts, data files and shell libraries
40 # are placed.
41 am_testaux_srcdir=$am_top_srcdir/t/ax
42 am_testaux_builddir=$am_top_builddir/t/ax
43
44 # Support for the "installcheck" target.
45 case ${am_running_installcheck:=no} in
46   yes)
47     am_amdir='@amdir@'
48     am_automake_acdir='@automake_acdir@'
49     am_bindir='@bindir@'
50     am_datadir='@datadir@'
51     am_docdir='@docdir@'
52     am_pkgvdatadir='@pkgvdatadir@'
53     am_scriptdir='@scriptdir@'
54     am_system_acdir='@system_acdir@'
55     ;;
56   no)
57     am_amdir=$am_top_srcdir/lib/am
58     am_automake_acdir=$am_top_srcdir/m4
59     am_bindir=$am_top_builddir/t/wrap
60     am_datadir=$am_top_srcdir
61     am_docdir=$am_top_srcdir/doc
62     am_pkgvdatadir=$am_top_srcdir/lib
63     am_scriptdir=$am_top_srcdir/lib
64     am_system_acdir=$am_top_srcdir/m4/acdir
65     ;;
66   *)
67     echo "$me: variable 'am_running_installcheck' has invalid"
68          "value '$am_running_installcheck'" >&2
69     exit 99
70     ;;
71 esac
72
73 APIVERSION='@APIVERSION@'
74 PATH_SEPARATOR='@PATH_SEPARATOR@'
75
76 host_alias=${host_alias-'@host_alias@'}; export host_alias
77 build_alias=${build_alias-'@build_alias@'}; export build_alias
78
79 # A concurrency-safe "mkdir -p" implementation.
80 MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}
81
82 # The shell we use to run our own test scripts, determined at configure
83 # time.  It is required in the self tests, and most importantly for the
84 # automatic re-execution of test scripts.
85 AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
86
87 # Make sure we override the user shell.  And do not read the value of
88 # $SHELL from the environment (think to the non-uncommon situation where
89 # e.g., $SHELL=/bin/tcsh).
90 SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
91
92 # User can override various tools used.  Prefer overriding specific for
93 # that automake testsuite, if they are available.
94 AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}}
95 PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
96 MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
97 YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}
98 LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}}
99 AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
100 AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
101 AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
102 AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
103 AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
104
105 # Tests which want complete control over aclocal or automake command-line
106 # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
107 # "test -z" tests take care not to re-initialize them if 'test-defs.sh'
108 # is re-sourced, as we want that file to remain really idempotent.
109 if test -z "$am_original_AUTOMAKE"; then
110   am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
111 fi
112 if test -z "$am_original_ACLOCAL"; then
113   am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
114 fi
115
116 # Use -Werror by default.  Tests for which this is inappropriate should
117 # use -Wno-error.
118 # Tests which want complete control over aclocal command-line options
119 # should use $am_original_ACLOCAL instead.
120 ACLOCAL="$am_original_ACLOCAL -Werror"
121
122 # See how Automake should be run.  We put --foreign as the default
123 # strictness to avoid having to create lots and lots of files.  A test
124 # can override this by specifying a different strictness.  Use -Wall
125 # -Werror by default.  Tests for which this is inappropriate (e.g. when
126 # testing that a warning is enabled by a specific switch) should use
127 # -Wnone or/and -Wno-error.
128 # Tests who want complete control over automake command-line options
129 # should use $am_original_AUTOMAKE instead.
130 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror -Wall"
131
132 # POSIX no longer requires 'egrep' and 'fgrep',
133 # but some hosts lack 'grep -E' and 'grep -F'.
134 EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
135 FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
136
137 # Compilers and their flags.  These can point to non-GNU compilers (and
138 # on non-Linux and non-BSD systems, they probably will).
139 CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
140 CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
141 F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
142 FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
143 CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
144 CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
145 FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
146 FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
147 CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
148
149 # GNU compilers and their flags.
150 GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
151 GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
152 GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}
153 GNU_FC=${AM_TESTSUITE_GNU_FC-${GNU_FC-'@GNU_FC@'}}
154 GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
155 GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
156 GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
157 GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
158 GNU_GCJ=${AM_TESTSUITE_GNU_GCJ-${GNU_GCJ-'@GNU_GCJ@'}}
159 GNU_GCJFLAGS=${AM_TESTSUITE_GNU_GCJFLAGS-${GNU_GCJFLAGS-'@GNU_GCJFLAGS@'}}
160
161 # No all versions of Tex support '--version', so we use a configure
162 # check to decide if tex is available.  This decision is embodied in
163 # this variable.
164 TEX=${AM_TESTSUITE_TEX-'@TEX@'}
165
166 # The amount we should wait after modifying files depends on the platform.
167 # For instance, Windows '95, '98 and ME have 2-second granularity
168 # and can be up to 3 seconds in the future w.r.t. the system clock.
169 # The creative quoting is to avoid spuriously triggering a failure in
170 # the maintainer checks,
171 sleep='sleep ''@MODIFICATION_DELAY@'
172
173 # An old timestamp that can be given to a file, in "touch -t" format.
174 # The time stamp should be portable to all file systems of interest.
175 # Just for fun, choose the exact time of the announcement of the GNU project
176 # in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
177 old_timestamp=198309271735.59
178
179 # Make our wrapper script (or installed scripts, if running under
180 # "installcheck") accessible by default.  And avoid to uselessly
181 # extend $PATH multiple times if this file is sourced multiple times.
182 case $PATH in
183   $am_bindir$PATH_SEPARATOR*) ;;
184   *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
185 esac
186
187 export PATH