[99a8d3]: testall Maximize Restore History

Download this file

testall    86 lines (75 with data), 1.4 kB

#!/bin/bash

# testall [-p python_command]
#
# Runs pyke/testpyke, and then all of the following twice:
#     doc/testdocs, examples/testexamples, Test/testTest
# 
# exit status > 0 if errors found.

ERRORFILES="/tmp/testall.$$"

ARGS="$* $ERRORFILES"

> $ERRORFILES
NUM_ERRORS=0

find . -name krb_compiler -prune -o -name compiled_krb -exec rm -rf "{}" +

cd pyke
echo pyke/testpyke
if ./testpyke $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi

cd ../doc
echo doc/testdocs with no doc/compiled_krb
if ./testdocs $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi
echo doc/testdocs with doc/compiled_krb
if ./testdocs $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi

cd ../examples
echo examples/testexamples with no compiled_krb
if ./testexamples $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi
echo examples/testexamples with compiled_krb
if ./testexamples $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi

cd ../Test
echo Test/testTest with no compiled_krb
if ./testTest $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi
echo Test/testTest with compiled_krb
if ./testTest $ARGS
then
    :
else
    NUM_ERRORS=$(($NUM_ERRORS + $?))
fi

if [ $NUM_ERRORS -eq 0 ]
then
    echo "No Errors!"
    rm -f $ERRORFILES
else
    echo "********** ERRORS ************* $NUM_ERRORS files had errors:"
    cat $ERRORFILES
    rm -f $ERRORFILES
    exit $NUM_ERRORS
fi