2018-07-11 05:14:49 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
CIDIR=$(dirname $(readlink -fn $0))
|
2018-07-16 09:49:54 -06:00
|
|
|
REALTIME=0
|
2018-07-11 05:14:49 -06:00
|
|
|
source $CIDIR/ci.functions
|
|
|
|
ASTETCDIR=$DESTDIR/etc/asterisk
|
|
|
|
|
|
|
|
pushd $TESTSUITE_DIR
|
|
|
|
|
2018-07-12 15:34:14 -06:00
|
|
|
./cleanup-test-remnants.sh
|
2018-07-16 09:49:54 -06:00
|
|
|
|
2018-07-17 06:13:35 -06:00
|
|
|
if [ $REALTIME -eq 1 ] ; then
|
2018-07-16 09:49:54 -06:00
|
|
|
$CIDIR/setupRealtime.sh
|
|
|
|
fi
|
|
|
|
|
2018-07-12 15:34:14 -06:00
|
|
|
export PYTHONPATH=./lib/python/
|
2018-07-23 11:23:22 -04:00
|
|
|
echo "Running tests ${TESTSUITE_COMMAND}"
|
|
|
|
./runtests.py --cleanup ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
|
2018-07-11 05:14:49 -06:00
|
|
|
|
2018-07-17 06:13:35 -06:00
|
|
|
if [ $REALTIME -eq 1 ] ; then
|
2018-07-17 03:03:02 -06:00
|
|
|
$CIDIR/teardownRealtime.sh
|
|
|
|
fi
|
|
|
|
|
2018-07-11 05:14:49 -06:00
|
|
|
if [ -f core* ] ; then
|
|
|
|
echo "*** Found a core file after running unit tests ***"
|
2018-07-12 15:34:14 -06:00
|
|
|
/var/lib/asterisk/scripts/ast_coredumper --no-default-search core*
|
2018-07-11 05:14:49 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-07-23 11:23:22 -04:00
|
|
|
popd
|