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
|
#!/bin/bash
set -e
$PREPARE_DEFAULT > /dev/null
$INCLUDE_FUNCS
cd $WC
logfile=$LOGDIR/060.comp-tests
if [[ "$opt_DEBUG" != 1 ]]
then
$INFO "No debugging compiled in, cannot do componenttests."
exit 0
fi
# test for matching
if $COMPONENT_SCRIPT $logfile $TEST_PROG_DIR/comp-test/fail-test.ct > /dev/null 2>&1
then
$ERROR "Component-test doesn't fail when it should!"
else
$SUCCESS "Component-tests running"
fi
(
cd /
$BINq urls file:///
)
base=$TEST_PROG_DIR/comp-test
for scr in `cd $base && ls ???_*.ct`
do
echo "testing $scr"
if $COMPONENT_SCRIPT $logfile $base/$scr
then
$INFO "$scr ok"
else
echo "$base/$scr:1: unexpected answer"
$ERROR "Component-test failed"
fi
done
$SUCCESS "ok"
|