2ae279e0d4
This is to better catch distribution errors. It's easier to notice that run-tests fails than to notice that one of many test suites is silently skipped.
47 lines
940 B
Bash
Executable File
47 lines
940 B
Bash
Executable File
#!/bin/sh
|
|
|
|
while [ -n "$1" ]; do
|
|
suite=$1
|
|
if [ -x $top_srcdir/test/suites/$suite/run ]; then
|
|
SUITES="$SUITES $suite"
|
|
else
|
|
echo "No such suite: $suite"
|
|
exit 1
|
|
fi
|
|
shift
|
|
done
|
|
|
|
if [ -z "$SUITES" ]; then
|
|
suitedirs=$top_srcdir/test/suites/*
|
|
for suitedir in $suitedirs; do
|
|
if [ -d $suitedir ]; then
|
|
SUITES="$SUITES `basename $suitedir`"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
export suites_srcdir=$top_srcdir/test/suites
|
|
export suites_builddir=suites
|
|
export scriptdir=$top_srcdir/test/scripts
|
|
export logdir=logs
|
|
export bindir=bin
|
|
|
|
passed=0
|
|
failed=0
|
|
for suite in $SUITES; do
|
|
echo "Suite: $suite"
|
|
if $suites_srcdir/$suite/run $suite; then
|
|
passed=$(($passed+1))
|
|
else
|
|
failed=$(($failed+1))
|
|
fi
|
|
done
|
|
|
|
if [ $failed -gt 0 ]; then
|
|
echo "$failed of $((passed+failed)) test suites failed"
|
|
exit 1
|
|
else
|
|
echo "$passed test suites passed"
|
|
rm -rf $logdir
|
|
fi
|