<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19017">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: use Python3 virtual environment<br><br>Requires Python3 testsuite changes<br><br>ASTERISK-26826<br><br>Change-Id: I92ec7dec751ad455503a584d6e860db88c56d6bc<br>---<br>M tests/CI/runTestsuite.sh<br>1 file changed, 11 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/CI/runTestsuite.sh b/tests/CI/runTestsuite.sh</span><br><span>index 466991a..2308349 100755</span><br><span>--- a/tests/CI/runTestsuite.sh</span><br><span>+++ b/tests/CI/runTestsuite.sh</span><br><span>@@ -4,6 +4,7 @@</span><br><span> TEST_TIMEOUT=600</span><br><span> source $CIDIR/ci.functions</span><br><span> ASTETCDIR=$DESTDIR/etc/asterisk</span><br><span style="color: hsl(120, 100%, 40%);">+SETUPVENV=$TESTSUITE_DIR/setupVenv.sh</span><br><span> </span><br><span> if [ x"$WORK_DIR" != x ] ; then</span><br><span>  export AST_WORK_DIR="$(readlink -f $WORK_DIR)"</span><br><span>@@ -11,16 +12,23 @@</span><br><span> fi</span><br><span> </span><br><span> pushd $TESTSUITE_DIR</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> ./cleanup-test-remnants.sh</span><br><span> </span><br><span> if [ $REALTIME -eq 1 ] ; then</span><br><span>  $CIDIR/setupRealtime.sh --initialize-db=${INITIALIZE_DB:?0}</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-export PYTHONPATH=./lib/python/</span><br><span style="color: hsl(120, 100%, 40%);">+# check to see if venv scripts exist so we can use them</span><br><span style="color: hsl(120, 100%, 40%);">+if [ -f "$SETUPVENV" ] ; then</span><br><span style="color: hsl(120, 100%, 40%);">+        # explicitly invoking setupVenv to capture output in case of failure</span><br><span style="color: hsl(120, 100%, 40%);">+  ./setupVenv.sh</span><br><span style="color: hsl(120, 100%, 40%);">+        VENVPREFIX="runInVenv.sh python "</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+     export PYTHONPATH=./lib/python/</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> echo "Running tests ${TESTSUITE_COMMAND} ${AST_WORK_DIR:+with work directory ${AST_WORK_DIR}}"</span><br><span style="color: hsl(0, 100%, 40%);">-./runtests.py --cleanup --timeout=${TEST_TIMEOUT} ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :</span><br><span style="color: hsl(120, 100%, 40%);">+./${VENVPREFIX}runtests.py --cleanup --timeout=${TEST_TIMEOUT} ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :</span><br><span> </span><br><span> if [ $REALTIME -eq 1 ] ; then</span><br><span>  $CIDIR/teardownRealtime.sh --cleanup-db=${CLEANUP_DB:?0}</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19017">change 19017</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19017"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I92ec7dec751ad455503a584d6e860db88c56d6bc </div>
<div style="display:none"> Gerrit-Change-Number: 19017 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>