diff --git a/autoconf_share/Makefile.common b/autoconf_share/Makefile.common index 5b2c016384d487b31a76bf4867af10ce161de66a..e62a9e73becebe0ae58f206f73da2b6b30172afd 100644 --- a/autoconf_share/Makefile.common +++ b/autoconf_share/Makefile.common @@ -260,3 +260,12 @@ help: @echo "dist make a distribution"; @echo "distcheck make and check a distribution"; @echo "rpm make an rpm"; + +# Define the default variables to export to the test scripts. +#TESTS_ENVIRONMENT = LOFARROOT="$(LOFARROOT)" \ +# lofar_sharedir="$(lofar_sharedir)" \ +# top_srcdir="$(top_srcdir)" \ +# srcdir="$(srcdir)" \ +# CHECKTOOLPROGS="$(CHECKTOOLPROGS)" \ +# MPIBIN="$(MPIBIN)" \ +# AIPSPP="$(AIPSPP)" diff --git a/autoconf_share/assay b/autoconf_share/assay index 6edb939d5a0c31526f3e0a8f5d627c7c40c4ac94..a45398e7c08004eb3220d69a3808dd0b4e90d92a 100755 --- a/autoconf_share/assay +++ b/autoconf_share/assay @@ -24,7 +24,7 @@ #----------------------------------------------------------------------------- -# Usage: assay <testexe> <max run-time(sec)> <precision> [<arguments>] +# Usage: assay <testexe> <max run-time(sec)> <precision> <needoutfil> [<arguments>] #----------------------------------------------------------------------------- # This script is an adapted version of the AIPS++ assay script. # @@ -139,6 +139,8 @@ shift PREC=$1 shift + NEEDOUTFIL=$1 + shift # Use LimitExec if available if [ -x $LOFARROOT/bin/LimitExec ] @@ -201,16 +203,12 @@ then CAT=cat else - echo "PASS (execution succeeded): $PROG" - exit - fi - ;; - 2) - if [ -f $PROG.stdout ] - then - CAT=cat - else - echo "FAIL (reference output file missing): $PROG" + if [ "$NEEDOUTFIL" = 1 ]; then + echo "FAIL (reference output file missing): $PROG" + STATUS=2 + else + echo "PASS (execution succeeded): $PROG" + fi exit fi ;; @@ -251,6 +249,7 @@ sed -e 's/[+-]\?\(\(\([0-9]\+\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9]\+\)\?\)/x/g' ${PROG}_tmp.out > ${PROG}_tmp.out2 sed -e 's/[+-]\?\(\(\([0-9]\+\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9]\+\)\?\)/x/g' ${PROG}_tmp_orig.out > ${PROG}_tmp_orig.out2 diff ${PROG}_tmp.out2 ${PROG}_tmp_orig.out2 > /dev/null 2>&1 + diff ${PROG}_tmp.out2 ${PROG}_tmp_orig.out2 > /dev/null 2>&1 if [ $? != 0 ] then echo "FAIL (output not verified): $PROG" diff --git a/autoconf_share/runtest.sh b/autoconf_share/runtest.sh index 8ca2bba4bf2acafac4b08262e3fda7ccc20539b4..98d18812fc0a47658dbf5489d1d5acd89b483250 100755 --- a/autoconf_share/runtest.sh +++ b/autoconf_share/runtest.sh @@ -22,19 +22,36 @@ # # $Id$ +# Set default options. +NEEDOUTFIL=0; + +# Handle possible options. +while [ $# != 0 ] +do + # Special cvs command? + if [ "$1" = "-stdout" ]; then + NEEDOUTFIL=1 + shift + elif [ "$1" = "-nostdout" ]; then + NEEDOUTFIL=0 + shift + else + break + fi +done if test $# -lt 1 || test $# -gt 3; then - echo "usage: runtest.sh <testname> [<max run-time>] [<precision>]" - exit 0 + echo "usage: runtest.sh [-stdout] <testname> [<max run-time>] [<precision>]" + exit 1 fi -if test $# -ge 2; then +if [ "$2" != "" ]; then MAXTIME=$2 else MAXTIME=300 # 300 seconds == 5 minutes fi -if test $# -ge 3; then +if [ "$3" != "" ]; then PREC=$3 else PREC=1e-5 @@ -114,13 +131,13 @@ else sed -e "s/<LOGFILENAME>/$1_tmp.log/" $lfr_share_dir/default.log_prop > $1.log_prop fi fi - + # # Define source directory and run assay # LOFAR_PKGSRCDIR=$srcdir export LOFAR_PKGSRCDIR -$lfr_share_dir/assay $1 $MAXTIME $PREC +$lfr_share_dir/assay $1 $MAXTIME $PREC $NEEDOUTFIL STS=$? # Cleanup (mainly for make distcheck). diff --git a/autoconf_share/variants.lofar17 b/autoconf_share/variants.lofar17 index 6f954260659d75b742d5d00fa0afbcdf3a76157b..c00563e273f3cbb2e0e5b48711802c33565fb4e8 100644 --- a/autoconf_share/variants.lofar17 +++ b/autoconf_share/variants.lofar17 @@ -2,7 +2,7 @@ gnu3.compiler.conf: CXX="$CCACHE /usr/bin/g++" gnu3.compiler.aipspp.var: --with-aipspp=/lofarbuild/aips++/prod/linux_gnu gnu.compiler.conf: CXX="$CCACHE /usr/bin/g++" -gnu.compiler.aipspp.var: --with-aipspp=/lofarbuild/aips++/prod/linux_gnu +gnu.compiler.aipspp.var: --with-aipspp=/lofarbuild/aips++/dev/linux_gnu --with-lapack=/usr gnu34.compiler.conf: CXX="$CCACHE /usr/local/gcc343/bin/g++" --with-ldflags="-Wl,--rpath,/usr/local/gcc343/lib" gnu34.compiler.aipspp.var: --with-aipspp=/lofarbuild/aips++/prod/linux_gnunew