Blame src/mpi/romio/test/rtest.in

Packit Service c5cf8c
#! /bin/sh
Packit Service c5cf8c
#
Packit Service c5cf8c
# Run some of the tests.  If any arguments are provided, pass them to the
Packit Service c5cf8c
# test programs.
Packit Service c5cf8c
#
Packit Service c5cf8c
# -mvhome is needed for the ANL SP, and is ignored by others
Packit Service c5cf8c
args=@MPIRUNARGS@
Packit Service c5cf8c
device=@DEVICE@
Packit Service c5cf8c
top_srcdir=@top_srcdir@
Packit Service c5cf8c
srcdir=@srcdir@
Packit Service c5cf8c
MPICH_VERSION=@MPICH_VERSION@
Packit Service c5cf8c
STOPFILE=$HOME/.stopmpichtests
Packit Service c5cf8c
mpirun=${MPIRUN:-"@MPIRUN@"}
Packit Service c5cf8c
MAKE="@MAKE@"
Packit Service c5cf8c
FILENAME=test
Packit Service c5cf8c
#
Packit Service c5cf8c
# Load basic procedures
Packit Service c5cf8c
. ${top_srcdir}/runbase
Packit Service c5cf8c
#
Packit Service c5cf8c
# Set mpirun to the name/path of the mpirun program
Packit Service c5cf8c
FindMPIRUN
Packit Service c5cf8c
#
Packit Service c5cf8c
#
Packit Service c5cf8c
test_mpi2=@HAS_MPI2@
Packit Service c5cf8c
runtests=1
Packit Service c5cf8c
quiet=0
Packit Service c5cf8c
makeeach=0
Packit Service c5cf8c
writesummaryfile=no
Packit Service c5cf8c
MAKE="@MAKE@"
Packit Service c5cf8c
for arg in "$@" ; do
Packit Service c5cf8c
    case $arg in 
Packit Service c5cf8c
	-checkonly )
Packit Service c5cf8c
	runtests=0
Packit Service c5cf8c
	;;
Packit Service c5cf8c
        -margs=*)
Packit Service c5cf8c
	margs=`echo $arg | sed 's/-margs=//'`
Packit Service c5cf8c
	args="$args $margs"
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	-summaryfile=*)
Packit Service c5cf8c
	writesummaryfile=yes
Packit Service c5cf8c
	summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	-small)
Packit Service c5cf8c
	makeeach=1
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	-fname=*)
Packit Service c5cf8c
	FILENAME=`echo $arg|sed 's/-*fname=//'`
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	-quiet)
Packit Service c5cf8c
	shift
Packit Service c5cf8c
	quiet=1
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	-help|-u)
Packit Service c5cf8c
	echo "runtests [-checkonly] [-margs='...']"
Packit Service c5cf8c
	echo "run tests in this directory.  If -checkonly set, just run"
Packit Service c5cf8c
	echo "the differences check (do NO rerun the test programs)."
Packit Service c5cf8c
	echo "If -margs is used, these options are passed to mpirun."
Packit Service c5cf8c
	echo "If -small is used, the examples are built, run, and deleted."
Packit Service c5cf8c
	exit 1
Packit Service c5cf8c
	;;
Packit Service c5cf8c
	*)
Packit Service c5cf8c
	if test -n "$arg" ; then
Packit Service c5cf8c
   	    echo "runtests: Unknown argument ($arg)"
Packit Service c5cf8c
	    exit 1
Packit Service c5cf8c
        fi
Packit Service c5cf8c
	;;
Packit Service c5cf8c
    esac
Packit Service c5cf8c
done
Packit Service c5cf8c
Packit Service c5cf8c
# If the programs are not available, run make.
Packit Service c5cf8c
if [ ! -x simple -a $makeeach = 0 -a $runtests = 1 ] ; then
Packit Service c5cf8c
    $MAKE default
Packit Service c5cf8c
fi
Packit Service c5cf8c
Packit Service c5cf8c
testfiles=""
Packit Service c5cf8c
if [ $runtests = 1 ] ; then
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
RunTest simple 4 "**** Testing simple.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest async 4 "**** Testing async.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest atomicity 4 "**** Testing atomicity.out ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest coll_test 4 "**** Testing coll_test.out ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest excl 4 "**** Testing excl.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest file_info 4 "**** Testing file_info.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest i_noncontig 2 "**** Testing i_noncontig.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest noncontig 2 "**** Testing noncontig.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest noncontig_coll 2 "**** Testing noncontig_coll.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest noncontig_coll2 4 "**** Testing noncontig_coll2.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest misc 4 "**** Testing misc.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest shared_fp 4 "**** Testing shared_fp.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest split_coll 4 "**** Testing split_coll.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest psimple 4 "**** Testing psimple.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest error 1 "**** Testing error.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
RunTest status 1 "**** Testing status.c ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
#
Packit Service c5cf8c
# Run Fortran tests ONLY if Fortran available
Packit Service c5cf8c
if [ @HAS_FORTRAN@ = 1 ] ; then 
Packit Service c5cf8c
    RunTest fmisc 4 "**** Testing fmisc.f ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
    RunTest fcoll_test 4 "**** Testing fcoll_test.f ****" "-fname $FILENAME"
Packit Service c5cf8c
Packit Service c5cf8c
    RunTest pfcoll_test 4 "**** Testing pfcoll_test.f ****" "-fname $FILENAME"
Packit Service c5cf8c
fi
Packit Service c5cf8c
Packit Service c5cf8c
else
Packit Service c5cf8c
    # Just run checks
Packit Service c5cf8c
    testfiles=`echo *.out`
Packit Service c5cf8c
fi
Packit Service c5cf8c
Packit Service c5cf8c
echo '*** Checking for differences from expected output ***'
Packit Service c5cf8c
CheckAllOutput context.diff
Packit Service c5cf8c
exit 0
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c