X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5807bb9156930091850a52b5bb9ab9f89082b04e..312d0d654f0143f6da1dc650f7419c15fd57f039:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index 565b31cc..5ebfa7b6 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -1,6 +1,6 @@ # Simple calculator. -*- Autotest -*- -# Copyright (C) 2000-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-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 @@ -46,12 +46,7 @@ m4_define([_AT_DATA_CALC_Y], m4_pushdef([AT_CALC_MAIN], [#include -#if HAVE_UNISTD_H -# include -#else -# undef alarm -# define alarm(seconds) /* empty */ -#endif +#include AT_SKEL_CC_IF([[ /* A C++ ]AT_NAME_PREFIX[parse that simulates the C signature. */ @@ -77,10 +72,12 @@ main (int argc, const char **argv) int count = 0; int status; - /* This used to be alarm (10), but that isn't enough time for - a July 1995 vintage DEC Alphastation 200 4/100 system, - according to Nelson H. F. Beebe. 100 seconds is enough. */ - alarm (100); + /* This used to be alarm (10), but that isn't enough time for a July + 1995 vintage DEC Alphastation 200 4/100 system, according to + Nelson H. F. Beebe. 100 seconds was enough for regular users, + but the Hydra build farm, which is heavily loaded needs more. */ + + alarm (200); if (argc == 2) input = fopen (argv[1], "r"); @@ -93,8 +90,7 @@ main (int argc, const char **argv) return 3; } -]AT_SKEL_CC_IF([], [m4_bmatch([$4], [%debug], -[ ]AT_NAME_PREFIX[debug = 1;])])[ +]AT_SKEL_CC_IF([], [AT_DEBUG_IF([ ]AT_NAME_PREFIX[debug = 1;])])[ status = ]AT_NAME_PREFIX[parse (]AT_PARAM_IF([[&result, &count]])[); if (fclose (input)) perror ("fclose"); @@ -462,14 +458,14 @@ AT_CHECK([cat stderr], 0, [expout]) ]) -# AT_CHECK_SPACES([FILE]) -# ----------------------- +# AT_CHECK_SPACES([FILES]) +# ------------------------ # Make sure we did not introduce bad spaces. Checked here because all # the skeletons are (or should be) exercized here. m4_define([AT_CHECK_SPACES], [AT_CHECK([$PERL -ne ' chomp; - print "$.: {$_}\n" + print "$ARGV:$.: {$_}\n" if (# No starting/ending empty lines. (eof || $. == 1) && /^\s*$/ # No trailing space. @@ -495,8 +491,9 @@ AT_BISON_OPTION_PUSHDEFS([$1]) AT_DATA_CALC_Y([$1]) AT_FULL_COMPILE([calc], AT_DEFINES_IF([[lex], [main]])) -AT_CHECK_SPACES([calc.AT_SKEL_CC_IF([cc], [c])]) -AT_DEFINES_IF([AT_CHECK_SPACES([calc.AT_SKEL_CC_IF([hh], [h])])]) +AT_CHECK_SPACES(m4_join([ ], + [calc.AT_SKEL_CC_IF([cc], [c])], + [AT_DEFINES_IF([calc.AT_SKEL_CC_IF([hh], [h])])])) # Test the priorities. _AT_CHECK_CALC([$1],