Hash :
06b90179
Author :
Date :
2012-02-25T12:37:25
tests: avoid spurious failure when gcj is not installed Since yesterday's commit, v1.11-2019-g4d2bf42, the gcj4 test would fail when gcj is not installed. * tests/defs-static.in (GNU_GCJ, GNU_GCJFLAGS): Define. * tests/Makefile.am (do_subust): Add those to the list of substituted symbols.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
# -*- shell-script -*-
# @configure_input@
#
# Copyright (C) 1996-2012 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/>.
# Defines and minimal setup for Automake testing environment.
# IMPORTANT NOTES AND REQUIREMENTS
# - Multiple inclusions of this file should be idempotent.
# - This code has to be 'set -e' clean.
# - This file should execute correctly with any system's /bin/sh
# shell, not only with configure-time detected $CONFIG_SHELL.
# Be more Bourne compatible.
# (Snippet inspired to configure's initialization in Autoconf 2.64)
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
# If Zsh is not started directly in Bourne-compatibility mode, it has
# some incompatibilities in the handling of $0 that conflict with
# our usage: i.e., $0 inside a file sourced with the '.' builtin is
# temporarily set to the name of the sourced file.
# Work around this when possible, otherwise abort the script.
# Note that a bug in some versions of Zsh prevents us from resetting $0
# in a sourced script, so the use of $argv0. For more info see:
# <http://www.zsh.org/mla/workers/2009/msg01140.html>
# Note: the apparently useless 'eval' below are needed by at least
# dash 0.5.2, to prevent it from bailing out with an error like
# "Syntax error: Bad substitution"
if eval '[[ "$0" = *."test" ]]'; then
# Good, FUNCTION_ARGZERO option was already off when this file was
# sourced. Thus we've nothing to do.
argv0=$0
elif eval 'test -n "${functrace[-1]}"'; then
# FUNCTION_ARGZERO option was on, but we have a easy workaround.
eval 'argv0=${functrace[-1]%:*}'
else
# Give up.
echo "$0: cannot determine the path of running test script" >&2
echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
exit 99
fi
else
argv0=$0
# Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
fi
# Check that the environment is properly sanitized.
# Having variables exported to the empty string is OK, since our code
# treats such variables as if they were unset.
for var in \
me \
required \
am_using_tap \
am_parallel_tests \
am_create_testdir \
am_tap_implementation \
am_test_prefer_config_shell \
am_original_AUTOMAKE \
am_original_ACLOCAL \
; do
if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
echo "$argv0: variable '$var' is set in the environment:" \
"this is unsafe" >&2
exit 99
fi
done
unset var
# See whether the current test script is expected to use TAP or not.
# Use a sensible default, while allowing the scripts to override this
# check.
if test -z "$am_using_tap"; then
case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
fi
testsrcdir='@abs_srcdir@'
top_testsrcdir='@abs_top_srcdir@'
testbuilddir='@abs_builddir@'
top_testbuilddir='@abs_top_builddir@'
testprefix='@prefix@'
# Support for the "installcheck" target.
case ${am_running_installcheck:=no} in
yes)
am_amdir='@amdir@'
am_automake_acdir='@automake_acdir@'
am_bindir='@bindir@'
am_datadir='@datadir@'
am_docdir='@docdir@'
am_pkgvdatadir='@pkgvdatadir@'
am_scriptdir='@scriptdir@'
am_system_acdir='@system_acdir@'
;;
no)
am_amdir=$top_testsrcdir/lib/am
am_automake_acdir=$top_testsrcdir/m4
am_bindir=$testbuilddir/wrap
am_datadir=$top_testsrcdir
am_docdir=$top_testsrcdir/doc
am_pkgvdatadir=$top_testsrcdir/lib
am_scriptdir=$top_testsrcdir/lib
am_system_acdir=$top_testsrcdir/m4/acdir
;;
*)
echo "$argv0: variable 'am_running_installcheck' has invalid"
"value '$am_running_installcheck'" >&2
exit 99
;;
esac
APIVERSION='@APIVERSION@'
PATH_SEPARATOR='@PATH_SEPARATOR@'
host_alias=${host_alias-'@host_alias@'}; export host_alias
build_alias=${build_alias-'@build_alias@'}; export build_alias
# Make sure we override the user shell. And do not read the value of
# $SHELL from the environment (think to the non-uncommon situation where
# e.g., $SHELL=/bin/tcsh).
SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
# User can override various tools used. Prefer overriding specific for
# that automake testsuite, if they are available.
PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}
LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}}
AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
# Tests who want complete control over aclocal or automake command-line
# options should use $am_original_ACLOCAL or $am_original_AUTOMAKE. The
# "test -z" tests take care not to re-initialize them if defs-static
# is re-sourced, as we want defs-static to remain really idempotent.
if test -z "$am_original_AUTOMAKE"; then
am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
fi
if test -z "$am_original_ACLOCAL"; then
am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
fi
# Use -Werror because this also turns some Perl warnings into error.
# Tests for which this is inappropriate should use -Wno-error.
# Tests who want complete control over aclocal command-line options
# should use $am_original_ACLOCAL instead.
ACLOCAL="$am_original_ACLOCAL -Werror"
# See how Automake should be run. We put --foreign as the default
# strictness to avoid having to create lots and lots of files. A test
# can override this by specifying a different strictness. Use -Wall
# -Werror by default. Tests for which this is inappropriate (e.g. when
# testing that a warning is enabled by a specific switch) should use
# -Wnone or/and -Wno-error.
# Tests who want complete control over automake command-line options
# should use $am_original_AUTOMAKE instead.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror -Wall"
# POSIX no longer requires 'egrep' and 'fgrep',
# but some hosts lack 'grep -E' and 'grep -F'.
EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
# Compilers and their flags. These can point to non-GNU compilers (and
# on non-Linux and non-BSD systems, they probably will).
CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
# GNU compilers and their flags.
GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}
GNU_FC=${AM_TESTSUITE_GNU_FC-${GNU_FC-'@GNU_FC@'}}
GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
GNU_GCJ=${AM_TESTSUITE_GNU_GCJ-${GNU_GCJ-'@GNU_GCJ@'}}
GNU_GCJFLAGS=${AM_TESTSUITE_GNU_GCJFLAGS-${GNU_GCJFLAGS-'@GNU_GCJFLAGS@'}}
# No all versions of Tex support '--version', so we use a configure
# check to decide if tex is available. This decision is embodied in
# this variable.
TEX=${AM_TESTSUITE_TEX-'@TEX@'}
# Whether $SHELL has working 'set -e' with exit trap.
sh_errexit_works='@sh_errexit_works@'
# The amount we should wait after modifying files depends on the platform.
# For instance, Windows '95, '98 and ME have 2-second granularity
# and can be up to 3 seconds in the future w.r.t. the system clock.
sleep='sleep @MODIFICATION_DELAY@'
# An old timestamp that can be given to a file, in "touch -t" format.
# The time stamp should be portable to all file systems of interest.
# Just for fun, choose the exact time of the announcement of the GNU project
# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
old_timestamp=198309271735.59
# Make our wrapper script (or installed scripts, if running under
# "installcheck") accessible by default. And avoid to uselessly
# extend $PATH multiple times if this file is sourced multiple times.
case $PATH in
$am_bindir$PATH_SEPARATOR*) ;;
*) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
esac
# Make our helper script accessible by default.
PATH=$testsrcdir/ax$PATH_SEPARATOR$PATH
export PATH