Skip to content
Snippets Groups Projects
Commit 4fc9e06d authored by Mike Bradeen's avatar Mike Bradeen Committed by Michael Bradeen
Browse files

CI: use Python3 virtual environment

Requires Python3 testsuite changes

ASTERISK-26826

Change-Id: I92ec7dec751ad455503a584d6e860db88c56d6bc
parent e2e049e4
No related branches found
No related tags found
Loading
...@@ -4,6 +4,7 @@ REALTIME=0 ...@@ -4,6 +4,7 @@ REALTIME=0
TEST_TIMEOUT=600 TEST_TIMEOUT=600
source $CIDIR/ci.functions source $CIDIR/ci.functions
ASTETCDIR=$DESTDIR/etc/asterisk ASTETCDIR=$DESTDIR/etc/asterisk
SETUPVENV=$TESTSUITE_DIR/setupVenv.sh
if [ x"$WORK_DIR" != x ] ; then if [ x"$WORK_DIR" != x ] ; then
export AST_WORK_DIR="$(readlink -f $WORK_DIR)" export AST_WORK_DIR="$(readlink -f $WORK_DIR)"
...@@ -11,16 +12,23 @@ if [ x"$WORK_DIR" != x ] ; then ...@@ -11,16 +12,23 @@ if [ x"$WORK_DIR" != x ] ; then
fi fi
pushd $TESTSUITE_DIR pushd $TESTSUITE_DIR
./cleanup-test-remnants.sh ./cleanup-test-remnants.sh
if [ $REALTIME -eq 1 ] ; then if [ $REALTIME -eq 1 ] ; then
$CIDIR/setupRealtime.sh --initialize-db=${INITIALIZE_DB:?0} $CIDIR/setupRealtime.sh --initialize-db=${INITIALIZE_DB:?0}
fi fi
export PYTHONPATH=./lib/python/ # check to see if venv scripts exist so we can use them
if [ -f "$SETUPVENV" ] ; then
# explicitly invoking setupVenv to capture output in case of failure
./setupVenv.sh
VENVPREFIX="runInVenv.sh python "
else
export PYTHONPATH=./lib/python/
fi
echo "Running tests ${TESTSUITE_COMMAND} ${AST_WORK_DIR:+with work directory ${AST_WORK_DIR}}" echo "Running tests ${TESTSUITE_COMMAND} ${AST_WORK_DIR:+with work directory ${AST_WORK_DIR}}"
./runtests.py --cleanup --timeout=${TEST_TIMEOUT} ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || : ./${VENVPREFIX}runtests.py --cleanup --timeout=${TEST_TIMEOUT} ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
if [ $REALTIME -eq 1 ] ; then if [ $REALTIME -eq 1 ] ; then
$CIDIR/teardownRealtime.sh --cleanup-db=${CLEANUP_DB:?0} $CIDIR/teardownRealtime.sh --cleanup-db=${CLEANUP_DB:?0}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment