<div dir="ltr"><div dir="ltr">On Thu, Sep 1, 2022 at 10:52 AM <<a href="mailto:asterisk@phreaknet.org">asterisk@phreaknet.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 9/1/2022 7:53 AM, Joshua C. Colp wrote:<br>
> On Thu, Sep 1, 2022 at 8:07 AM <<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a> <br>
> <mailto:<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a>>> wrote:<br>
><br>
>     On 8/31/2022 7:47 PM, Michael Bradeen wrote:<br>
>     > Hello again!<br>
>     ><br>
>     > The Python3 release of the testsuite has been merged. The wiki has<br>
>     > been updated and will continue to update as things change.<br>
>     ><br>
>     > As indicated before, with this change running the testsuite on<br>
>     Python2<br>
>     > is no longer supported.  Please check the wiki for any questions<br>
>     and<br>
>     > reply on the forum or this email with questions that come up!<br>
>     Thanks for the update Mike, and all the work involved in this,<br>
><br>
>         I was able to get the runInVenv.sh script to finally run last<br>
>     night,<br>
>     after installing a few additional Debian packages (python3-dev and<br>
>     python3-venv)<br>
>     (I wonder if an install_prereqs.sh for the test suite might be<br>
>     useful at<br>
>     some point, but that's for a different day)<br>
><br>
><br>
> There already is one in the same place as the Asterisk one, <br>
> contrib/scripts/install_prereq<br>
<br>
I went ahead and ran that on a different system.<br>
At the end, I get:<br>
<br>
#############################################<br>
## install completed successfully<br>
#############################################<br>
<br>
Testsuite requires python version >= 3.6.8<br>
Your installed python is<br>
Python 2.7.18<br>
<br>
However, I got this when running:<br>
(note, this was with setupVenv.sh patched to remove the output direction <br>
- otherwise you get absolutely nothing)<br></blockquote><div><br></div><div>To be specific - you mean when runInVenv.sh is patched to remove the output redirection. Running setupVenv.sh manually outputs everything.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
root@debian11:/usr/src/testsuite# ./runInVenv.sh python runtests.py -l<br>
Reinstall required, removing and recreating venv<br>
The virtual environment was not created successfully because ensurepip <br>
is not<br>
available.  On Debian/Ubuntu systems, you need to install the python3-venv<br>
package using the following command.<br>
<br>
     apt-get install python3-venv<br>
<br>
You may need to use sudo with that command.  After installing the <br>
python3-venv<br>
package, recreate your virtual environment.<br>
<br>
Failing command: ['/usr/src/testsuite/.venv/bin/python3', '-Im', <br>
'ensurepip', '--upgrade', '--default-pip']<br>
<br>
One of the pre-reqs that caused issues before is covered, but <br>
python3-venv still needs to be added to the install_prereq script <br>
actually. And at the moment, since all errors are going into the ether, <br>
there's no indication at all of this issue.<br>
<br>
I can submit a review to add this pre-req; it sounded like maybe further <br>
discussion was warranted on the error output redirection but I still <br>
think that's the more appropriate way to do it.<br></blockquote><div><br></div><div>I think adding it to install_prereq is fine. I think removing error output redirection is fine. It's not going to run every time and clutter things up.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
On the upside, now runtests.py can "find" Asterisk stuff, unlike before, <br>
so install_prereq was actually key to making it work. I'm encountering <br>
other issues, but at least tests themselves are trying to run, which is <br>
progress:<br>
<br>
root@debian11:/usr/src/testsuite# ./runInVenv.sh python runtests.py <br>
--test=tests/apps<br>
Running tests for Asterisk (run 1 of 1)...<br>
<br>
Tests to run: 153 * 1 time(s) = 153  Maximum test inactivity time: 0 sec.<br>
--> Running test <br>
'tests/apps/agents/agent_acknowledge/agent_acknowledge_error' ...<br>
Making sure Asterisk isn't running ...<br>
Making sure SIPp isn't running...<br>
Running tests/apps/agents/agent_acknowledge/agent_acknowledge_error ...<br>
[Sep 01 09:52:09] WARNING[2716462]: asterisk.asterisk:246 errReceived: <br>
Asterisk 127.0.0.1 received error: ASTdb initialization failed.  <br>
ASTERISK EXITING!<br>
<br>
I was wondering if maybe python should be python3, given my default is <br>
2.7 apparently, but I guess that wasn't necessary.<br></blockquote><div><br></div><div>Referencing an explicit Python version is acceptable in things, so changing it since it requires 3 is fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I think it would be good to add a note about this to the wiki[1], as <br>
opposed to install various things ad hoc individually. This page[2] does <br>
mention the script, but it says it's for Python 2 and makes it seem like <br>
the script is obsolete, so if that's not the case, then maybe that <br>
should be updated.<br>
<br>
[1] <a href="https://wiki.asterisk.org/wiki/display/AST/Using+Python3" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Using+Python3</a><br>
[2] <br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Installing+the+Asterisk+Test+Suite" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Installing+the+Asterisk+Test+Suite</a><br>
<br>
NA<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Project Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></font><br></div></div></div></div></div></div></div></div></div></div></div>