Change in osmo-ttcn3-hacks[master]: library/Misc_Helpers: add f_osmo_repo_is()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Nov 29 21:15:31 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386 )

Change subject: library/Misc_Helpers: add f_osmo_repo_is()
......................................................................

library/Misc_Helpers: add f_osmo_repo_is()

Create functions to check which from Osmocom repository the SUT is
running. Put it in Misc_Helpers instead of a new library file since
Misc_Helpers is already available in many/all? tests and it fits there
too.

Depends: docker-playground Ic06532f7a67e59458652c5cf4c8f6fee8113e703
Related: OS#5327
Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28
---
M library/Misc_Helpers.ttcn
1 file changed, 17 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index a402525..e01c170 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -1,5 +1,22 @@
 module Misc_Helpers {
 
+modulepar {
+	charstring mp_osmo_repo := "nightly";
+}
+
+/* Test the Osmocom repository (nightly, latest, 2021q4, ...), from which the
+ * SUT is running (OS#4878). Usage examples:
+ * 	if (Misc_Helpers.f_osmo_repo_is("nightly")) {
+ * 		...
+ * 	}
+ * 	if (Misc_Helpers.f_osmo_repo_is(("nightly", "2021q4"))) {
+ * 		...
+ * 	}
+ */
+function f_osmo_repo_is(template charstring ver) return boolean {
+	return match(mp_osmo_repo, ver);
+}
+
 /* Try to properly shutdown a testcase.
  * The reliable method to stop a testcase without running into dynamic
  * testcase errors due to unconnected ports receiving messages is to call

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28
Gerrit-Change-Number: 26386
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211129/255c2e6a/attachment.htm>


More information about the gerrit-log mailing list