<p>Neels Hofmeyr <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10866">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Jenkins Builder: Verified
Neels Hofmeyr: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_interact/common: ignore trailing empty lines in received results<br><br>If the VTY/CTRL output contains trailing newlines, do not cause those to<br>trigger mismatch errors, rather drop those.<br><br>Rationale: in transcript scripts, the amount of empty lines between expected<br>results is ignored, to allow cosmetically arranging into sections. So trailing<br>newlines are dropped, and there is no way to preserve those.<br><br>Change-Id: I1930868451c5738b17e318a9807590d948210b9a<br>---<br>M osmopy/osmo_interact/common.py<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py</span><br><span>index 31f44a8..39163a2 100644</span><br><span>--- a/osmopy/osmo_interact/common.py</span><br><span>+++ b/osmopy/osmo_interact/common.py</span><br><span>@@ -175,6 +175,10 @@</span><br><span> step.verify_interact_state(self)</span><br><span> </span><br><span> res = self.command(step.command)</span><br><span style="color: hsl(120, 100%, 40%);">+ # trailing empty lines in the command output cannot be preserved because we allow</span><br><span style="color: hsl(120, 100%, 40%);">+ # arbitrary newlines between commands. Do not even track these.</span><br><span style="color: hsl(120, 100%, 40%);">+ while res and not res[-1]:</span><br><span style="color: hsl(120, 100%, 40%);">+ res = res[:-1]</span><br><span> </span><br><span> if self.verbose:</span><br><span> sys.stderr.flush()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10866">change 10866</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/10866"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: python/osmo-python-tests </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I1930868451c5738b17e318a9807590d948210b9a </div>
<div style="display:none"> Gerrit-Change-Number: 10866 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>