[asterisk-dev] Python 3 test suite

asterisk at phreaknet.org asterisk at phreaknet.org
Thu Sep 1 08:13:46 CDT 2022


On 9/1/2022 7:53 AM, Joshua C. Colp wrote:
> On Thu, Sep 1, 2022 at 8:07 AM <asterisk at phreaknet.org 
> <mailto:asterisk at phreaknet.org>> wrote:
>
>     On 8/31/2022 7:47 PM, Michael Bradeen wrote:
>     > Hello again!
>     >
>     > The Python3 release of the testsuite has been merged. The wiki has
>     > been updated and will continue to update as things change.
>     >
>     > As indicated before, with this change running the testsuite on
>     Python2
>     > is no longer supported.  Please check the wiki for any questions
>     and
>     > reply on the forum or this email with questions that come up!
>     Thanks for the update Mike, and all the work involved in this,
>
>         I was able to get the runInVenv.sh script to finally run last
>     night,
>     after installing a few additional Debian packages (python3-dev and
>     python3-venv)
>     (I wonder if an install_prereqs.sh for the test suite might be
>     useful at
>     some point, but that's for a different day)
>
>
> There already is one in the same place as the Asterisk one, 
> contrib/scripts/install_prereq
Ah, thanks for pointing that out ;)

That script fails for me because it assumes sudo is installed, and the 
test system I ran it on didn't have sudo. I'm not sure if that's a 
reasonable assumption to make, either. I think it's more reasonable to 
have the install process run install_prereq itself as sudo, as opposed 
to making sudo calls within the script. The regular Asterisk 
install_prereq script doesn't have this sudo dependency.

I imagine this type of thing is typically run as root or sudo anyways, 
and if the script needs to ensure it's being run as root (even though 
this is the user's responsibility), it could  check the UID and abort if 
it's not 0.
Any objection to removing the sudo calls from install_prereq? It's 
unnecessary and causes breakage.

NA



More information about the asterisk-dev mailing list