# Process with autom4te to create an -*- Autotest -*- test suite. # # see regression/... subdirs wherein for each of the cases and each check (enumerated) is a pre and post dir. # In pre initial files are placed, in post results can be found to be checked by diff in this testsuite. AT_INIT([Molecular Builder]) AT_TESTED(egrep find grep) # Use colored output with new-enough Autotest. m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS]) AT_BANNER([MoleCuilder - Code Checks]) AT_SETUP([Checking for present MemDebug.hpp include]) AT_KEYWORDS([CodeCheck,MemDebug]) m4_include(atlocal) ok="builder.cpp MemDebug.cpp SubspaceFactorizer.cpp TestRunner.cpp" echo `pwd` echo "${#ok[*]} are ok to not contain MemDebug.hpp: ${ok[0]} ${ok[1]}." liste=`find ${abs_top_srcdir}/src -name '*.cpp'` for file in $liste do # check whether its one of the excluded ones found=0 for item in $ok do if test "$item" == "`basename $file`" then found=1 break fi done # if not, check whether it contains the include if its NOT a unit test if test -z `echo $file | grep unittests` then if test $found -eq 0 then AT_CHECK([egrep -q '^#include.*MemDebug.hpp' $file], 0, [ignore], [ignore], [echo "Could not find MemDebug.hpp include in $file."]) fi fi done AT_CLEANUP