[Asterisk-code-review] CI: use Python3 virtual environment (asterisk[16])

George Joseph asteriskteam at digium.com
Mon Aug 22 05:33:36 CDT 2022


Attention is currently required from: Michael Bradeen.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18965 )

Change subject: CI: use Python3 virtual environment
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

File tests/CI/runTestsuite.sh:

https://gerrit.asterisk.org/c/asterisk/+/18965/comment/5f03aa61_750a14d9 
PS1, Line 15: if [[ "$VIRTUAL_ENV" != "" ]]
            : then
            : 		echo "Detected activated virtual environment:"
            : 		echo $VIRTUAL_ENV
            : 		echo "Skipping creation of new environment"
            : else
            : 	python3 -m venv ${TESTSUITE_DIR}/.venv
            : 	source ${TESTSUITE_DIR}/.venv/bin/activate
            : 	if [[ "$VIRTUAL_ENV" != "" ]]
            : 	then
            : 		echo "Successfully activated virtual environment:"
            : 		echo $VIRTUAL_ENV
            : 		python -m pip install --upgrade pip
            : 		python -m pip install wheel setuptools build
            : 		python -m pip install -r ./requirements.txt
            : 		python -m pip install -r ./extras.txt
            : 	else
            : 		echo "Virtual environment failed, attempting fall-back method"
            : 		export PYTHONPATH=./lib/python/
            : 	fi
            : fi
This logic should be placed in a top-level script in the testsuite (setup.sh maybe?) or directly in runtests.py.  With it here, you can't run the testsuite manually from the testsuite directory.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18965
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I92ec7dec751ad455503a584d6e860db88c56d6bc
Gerrit-Change-Number: 18965
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Comment-Date: Mon, 22 Aug 2022 10:33:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220822/5423186f/attachment.html>


More information about the asterisk-code-review mailing list