X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f3ead217b8636f623399e66bd937b1c51774d4af..f6df83b4e80b2a53c08b5dc654e247076a3b9b03:/tests/local.at?ds=inline diff --git a/tests/local.at b/tests/local.at index 121dedf2..b7d75afc 100644 --- a/tests/local.at +++ b/tests/local.at @@ -29,6 +29,20 @@ m4_define([m4_null_if], [], [$2], [$3])]) +# AT_SETUP_STRIP(TITLE) +# --------------------- +# Abbreviate the TITLE to be passed to AT_SETUP. +m4_define([AT_SETUP_STRIP], +[m4_bpatsubsts([$1], + [%\(language\|skeleton\) "?\([^\" ]*\)"?], + [\2], + [%define "?\([-A-Za-z0-9_.]+\)"? \("\([^\" ]+\)"\|\([-A-Za-z0-9_.]+\)\)], + [\1=\3\4], + [%define "?\([-A-Za-z0-9_.]+\)"?], + [\1])dnl +]) + + ## ------------- ## ## Basic tests. ## ## ------------- ## @@ -464,7 +478,7 @@ AT_BISON_CHECK_NO_XML($@)]) # -------------------------------------------------- # Low-level macro to run bison once. m4_define([AT_BISON_CHECK_], -[AT_CHECK(AT_QUELL_VALGRIND[[ bison ]]$@)]) +[AT_CHECK(AT_QUELL_VALGRIND[[ bison -fno-caret ]]$@)]) # AT_BISON_CHECK_WARNINGS(BISON_ARGS, [OTHER_AT_CHECK_ARGS]) @@ -515,7 +529,7 @@ fi]dnl # when a tortured grammar's XML is known to be too large for xsltproc to # handle. m4_define([AT_BISON_CHECK_NO_XML], -[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison ]]$@) +[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison -fno-caret ]]$@) AT_BISON_CHECK_WARNINGS($@)]) # AT_BISON_CHECK_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS]) @@ -581,9 +595,7 @@ m4_define([AT_QUELL_VALGRIND], # otherwise pass "-c"; this is a hack. The default SOURCES is OUTPUT # with trailing .o removed, and ".c" appended. m4_define([AT_COMPILE], -[AT_CHECK([case $POSIXLY_CORRECT_IS_EXPORTED:$C_COMPILER_POSIXLY_CORRECT in - true:false) echo 'cannot compile properly with POSIXLY_CORRECT' && exit 77;; -esac]) +[AT_CHECK([$BISON_C_WORKS], 0, ignore, ignore) AT_CHECK(m4_join([ ], [$CC $CFLAGS $CPPFLAGS], [m4_bmatch([$1], [[.]], [-c], [$LDFLAGS])], @@ -889,12 +901,20 @@ m4_popdef([AT_COND_CASE])]) + ## ----------------------- ## ## Launch the test suite. ## ## ----------------------- ## AT_INIT +# AT_SETUP([TITLE]) +# ----------------- +# Redefine AT_SETUP to be more concise. Must be done after AT_INIT. +m4_copy_force([AT_SETUP], [B4_SETUP]) +m4_define([AT_SETUP], +[B4_SETUP(m4_expand([AT_SETUP_STRIP([[$1]])]))]) + # Cannot assign CC and CFLAGS here, since atlocal is loaded after # options are processed, so we don't know the value of CXX and # CXXFLAGS yet.