<p>Rodrigo Ramirez Norambuena has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/11376">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asterisk.py: Bugfix for select directory with most space<br><br>To select the directory with more available space is used the sorted<br>function with os.statvfs and sorted result in order  [0, 1, 2,...]<br><br>As we need the directory with more space in the first position.<br>For this change the sorted by the reverse order. This patch fix<br>this condition.<br><br>Change-Id: I19ad9c2ba83cdbb1977938fa8287cb413372be1e<br>---<br>M lib/python/asterisk/asterisk.py<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/76/11376/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/asterisk.py b/lib/python/asterisk/asterisk.py</span><br><span>index c40865d..b8323dc 100644</span><br><span>--- a/lib/python/asterisk/asterisk.py</span><br><span>+++ b/lib/python/asterisk/asterisk.py</span><br><span>@@ -324,7 +324,10 @@</span><br><span>         best_tmp = os.getenv("AST_WORK_DIR")</span><br><span>         if not best_tmp:</span><br><span>             # select tmp path with most available space</span><br><span style="color: hsl(0, 100%, 40%);">-            best_tmp = sorted(['/tmp', '/var/tmp'], key=lambda path: os.statvfs(path).f_bavail)[0]</span><br><span style="color: hsl(120, 100%, 40%);">+            best_tmp = sorted(['/tmp', '/var/tmp'],</span><br><span style="color: hsl(120, 100%, 40%);">+                              key=lambda path: os.statvfs(path).f_bavail,</span><br><span style="color: hsl(120, 100%, 40%);">+                              reverse=True)[0]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         # Base location of the temporary files created by the testsuite</span><br><span>         test_suite_root = best_tmp + "/asterisk-testsuite"</span><br><span>         # The default etc directory for Asterisk</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/11376">change 11376</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/testsuite/+/11376"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I19ad9c2ba83cdbb1977938fa8287cb413372be1e </div>
<div style="display:none"> Gerrit-Change-Number: 11376 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Rodrigo Ramirez Norambuena <a@rodrigoramirez.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>