<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">library/Misc_Helpers: add f_is_osmocom_* functions<br><br>Create functions to check which version of the Osmocom stack is running.<br>Put it in Misc_Helpers instead of a new library file since Misc_Helpers<br>is already available in many/all? tests and it fits there too.<br><br>Depends: docker-playground Ic06532f7a67e59458652c5cf4c8f6fee8113e703<br>Related: OS#5327<br>Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28<br>---<br>M library/Misc_Helpers.ttcn<br>1 file changed, 19 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/86/26386/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn</span><br><span>index a402525..94007be 100644</span><br><span>--- a/library/Misc_Helpers.ttcn</span><br><span>+++ b/library/Misc_Helpers.ttcn</span><br><span>@@ -1,5 +1,24 @@</span><br><span> module Misc_Helpers {</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+modulepar {</span><br><span style="color: hsl(120, 100%, 40%);">+   charstring mp_osmocom_stack_version := "nightly";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Functions for having different test code paths based on the version of the</span><br><span style="color: hsl(120, 100%, 40%);">+ * Osmocom stack (nightly, latest, 2021q4, ...). See OS#4878. */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+function f_is_osmocom_nightly() return boolean {</span><br><span style="color: hsl(120, 100%, 40%);">+ return mp_osmocom_stack_version == "nightly";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+function f_is_osmocom_latest() return boolean {</span><br><span style="color: hsl(120, 100%, 40%);">+ return mp_osmocom_stack_version == "latest";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+function f_is_osmocom_2021q4() return boolean {</span><br><span style="color: hsl(120, 100%, 40%);">+  return mp_osmocom_stack_version == "2021q4";</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Try to properly shutdown a testcase.</span><br><span>  * The reliable method to stop a testcase without running into dynamic</span><br><span>  * testcase errors due to unconnected ports receiving messages is to call</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386">change 26386</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/c/osmo-ttcn3-hacks/+/26386"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28 </div>
<div style="display:none"> Gerrit-Change-Number: 26386 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>