Files
asterisk/tests/CI/runTestsuite.sh
Corey Farrell 09b258fd69 CI: Split --test-command argument.
The --test-command argument has now been split, unit tests now use
`--unittest-command` and the testsuite uses --testsuite-command.

This will make it easier to create a script which run everything by
forwarding the same arguments to all CI scripts.

Change-Id: Ia54aa4848eaffbdf13175fcda40fc0b23080ad71
2018-07-23 10:34:35 -05:00

30 lines
674 B
Bash
Executable File

#!/usr/bin/env bash
CIDIR=$(dirname $(readlink -fn $0))
REALTIME=0
source $CIDIR/ci.functions
ASTETCDIR=$DESTDIR/etc/asterisk
pushd $TESTSUITE_DIR
./cleanup-test-remnants.sh
if [ $REALTIME -eq 1 ] ; then
$CIDIR/setupRealtime.sh
fi
export PYTHONPATH=./lib/python/
echo "Running tests ${TESTSUITE_COMMAND}"
./runtests.py --cleanup ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
if [ $REALTIME -eq 1 ] ; then
$CIDIR/teardownRealtime.sh
fi
if [ -f core* ] ; then
echo "*** Found a core file after running unit tests ***"
/var/lib/asterisk/scripts/ast_coredumper --no-default-search core*
exit 1
fi
popd