1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
# This is not a standalone script; it is invoked by
# one or more of the main scripts
if test "x$SETX" = x1 ; then set -x ; fi
quiet=0
PARAMS="[log]"
#PARAMS="${PARAMS}[fetch=memory]"
#PARAMS="${PARAMS}[show=fetch]"
OCLOGFILE=/dev/null
DUMPFLAGS=
# Locate directories
testdata3="${srcdir}/testdata3"
expected3="${srcdir}/expected3"
rm -f ./.dodsrc ./.ocrc ./.daprc
passcount=0
xfailcount=0
failcount=0
# Try to figure out our platform
myplatform=`uname -a | cut -d" " -f 1`
case "$myplatform" in
Darwin*) platform=osx ;;
MINGW*) platform=mingw ;;
CYGWIN*) platform=cygwin ;;
linux*) platform=linux ;;
Linux*) platform=linux ;;
*) platform=unknown ;;
esac
# How to access local files
FILEURL="file://${testdata3}"
processstatus() {
if test "$ok" = 1 ; then
status=0 # succeed
elif test "x$isxfail" = "x0" ; then
status=1 # fail
else
status=2 # xfail
fi
case "$status" in
0)
passcount=`expr $passcount + 1`
if test "x$quiet" = "x" ; then echo "*** SUCCEED: ${x}"; fi
;;
1)
failcount=`expr $failcount + 1`
echo "*** FAIL: ${x}"
;;
2)
xfailcount=`expr $xfailcount + 1`
echo "*** XFAIL : ${x}"
;;
esac
}
summarize() {
totalcount=`expr $passcount + $failcount + $xfailcount`
okcount=`expr $passcount + $xfailcount`
if test "$failcount" -gt 0 ; then
echo "*** FAILED: ${okcount}/${totalcount} ; ${xfailcount} expected failures ; ${failcount} unexpected failures"
else
echo "*** PASSED: ${okcount}/${totalcount} ; ${xfailcount} expected failures ; ${failcount} unexpected failures"
fi
}
cleanup() {
rm -fr ${RESULTSDIR}
}
doexit() {
if test "$failcount" -gt 0
then
exit 1
else
exit 0
fi
}
|