# @configure_input@ # # Top level autotest module for instantiation of the mingwrt testsuite. # m4_define([AT_PACKAGE_STRING],[@PACKAGE_STRING@]) m4_define([AT_PACKAGE_BUGREPORT],[@PACKAGE_BUGREPORT@]) # # $Id$ # # Written by Keith Marshall # Copyright (C) 2016, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) shall be included in all copies or substantial portions of the # Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # MINGW_AT_LANG( [LANGUAGE = C] ) # ------------------------------- # Select to programming language compiler which is to be used # when compiling subsequent program fragments, as specified in # MINGW_AT_CHECK_COMPILE or MINGW_AT_CHECK_RUN tests. # m4_define([MINGW_AT_LANG],[m4_if([$1],[C++],dnl [m4_define([at_lang_compile],[$at_compiler_cxx $CPPFLAGS $CFLAGS])]dnl [m4_define([at_lang_source],[at_source.cpp])],dnl [m4_define([at_lang_compile],[$at_compiler_cc $CPPFLAGS $CFLAGS])]dnl [m4_define([at_lang_source],[at_source.c])])dnl ])# MINGW_AT_LANG # MINGW_AT_CHECK_COMPILE( SOURCE ) # -------------------------------- # Check that the SOURCE program fragment is compilable, using the # compiler appropriate to the currently selected source language; # the compiler is expected to complete with zero exit status, and # to have written nothing to either STDOUT or STDERR. # m4_define([MINGW_AT_CHECK_COMPILE],[AT_DATA([at_lang_source],$1 ) AT_CHECK([at_lang_compile -c at_lang_source -o /dev/null]) ])# MINGW_AT_CHECK_COMPILE # MINGW_AT_CHECK_RUN( SOURCE, [STATUS = 0], [STDOUT], [STDERR] ) # -------------------------------------------------------------- # Check that the SOURCE program fragment is both compilable, using # the compiler appropriate to the currently selected source language, # and may then be executed to exit with STATUS, and with output as # specified to each of STDOUT and STDERR. # m4_define([MINGW_AT_CHECK_RUN],[AT_DATA([at_lang_source],$1 ) AT_CHECK([at_lang_compile at_lang_source -o at_prog.exe -L../../lib]) AT_CHECK([./at_prog.exe],[$2],[$3],[$4]) ])# MINGW_AT_CHECK_RUN # MINGW_AT_DATA_CRLF( FILENAME, TEXT ) # ------------------------------------ # Construct reference data file FILENAME, with content as specified # by TEXT, (which may comprise multiple lines), ensuring that each # line of TEXT is terminated according to the CRLF convention. # m4_define([MINGW_AT_DATA_CRLF],[AT_DATA([$1],[$2]) AT_CHECK([awk '{sub("\r$",""); printf "%s\r\n", $][0}' $1],,[stdout]) m4_if([$1],[stdout],,AT_CHECK([mv stdout $1]))dnl ])# MINGW_AT_DATA_CRLF # Initialize autotest, and select C as default programming language. # AT_INIT MINGW_AT_LANG([C]) # Individual test groups are specified separately, via the following # collection of autotest M4 include files. # m4_include([headers.at]) m4_include([ansiprintf.at]) m4_include([logarithms.at]) m4_include([powerfunc.at]) m4_include([clockapi.at]) # vim: filetype=config formatoptions=croql # $RCSfile$: end of file