<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/15360">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asterisk.py: Skip over astcachedir during directory mirroring<br><br>A recent change to Asterisk added the ability to specify the<br>media cache directory in asterisk.conf and the sample file<br>sets "astcachedir => /tmp". When the testsuite iterates<br>over the directories in the "[directories]" category in<br>asterisk.conf it looks in each directory and tries to<br>recreate it in /tmp/asterisk-testsuite. Since astcachedir<br>actually points to /tmp itself, the testsuite tries to<br>recursively create a directory structure. The result<br>is a python crash because the pathname eventually exceeds<br>maximum length.<br><br>* Updated asterisk.py:_make_directory_structure to skip<br> over the astcachedir entry.<br><br>Change-Id: I347736878eeda063a3bdb0c79cc1d727136ec2bd<br>---<br>M lib/python/asterisk/asterisk.py<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></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 d9bb0d9..977dc6e 100644</span><br><span>--- a/lib/python/asterisk/asterisk.py</span><br><span>+++ b/lib/python/asterisk/asterisk.py</span><br><span>@@ -911,7 +911,8 @@</span><br><span> for (var, val) in dir_cat.options:</span><br><span> # We cannot simply skip ``val`` here if we already processed it.</span><br><span> # Some dirs are exempt from copying, based on ``var``.</span><br><span style="color: hsl(0, 100%, 40%);">- self.__mirror_dir(var, val, cache)</span><br><span style="color: hsl(120, 100%, 40%);">+ if var != "astcachedir":</span><br><span style="color: hsl(120, 100%, 40%);">+ self.__mirror_dir(var, val, cache)</span><br><span> </span><br><span> self._directory_structure_made = True</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/15360">change 15360</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/+/15360"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I347736878eeda063a3bdb0c79cc1d727136ec2bd </div>
<div style="display:none"> Gerrit-Change-Number: 15360 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.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-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>