Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

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/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Tue Apr 30 07:20:25 UTC 2019


Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13804 )

Change subject: virtual: Unify the lua script into a single one
......................................................................

virtual: Unify the lua script into a single one

In the quest to support multiple testcases we will use a single
script. Parts can be enabled/disabled depending on which tests
we want/need to run.

Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
---
R src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
M src/osmo_ms_driver/location_update_test.py
M src/osmo_ms_driver/starter.py
3 files changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
similarity index 73%
rename from src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl
rename to src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
index c25d799..0adb895 100644
--- a/src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
@@ -2,13 +2,20 @@
 event = require('ms_support')
 send = 1
 
-function mm_cb(new_state, new_substate, old_substate)
+
+function lu_test_mm_cb(new_state, new_substate, old_substate)
         if new_state == 19 and new_substate == 1 and send == 1 then
             send = 0
             event.send({lu_done=1})
         end
 end
 
+function mm_cb(new_state, new_substate, old_substate)
+% if test.run_lu_test:
+	lu_test_mm_cb(new_state, new_substate, old_substate)
+% endif
+end
+
 local cbs = {
         Mm=mm_cb
 }
diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py
index 5ff2199..82c1cb3 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -59,7 +59,7 @@
     decides how quickly to start them and a timeout.
     """
 
-    TEMPLATE_LUA = "osmo-mobile-lu.lua"
+    TEMPLATE_LUA = "osmo-mobile.lua"
     TEMPLATE_CFG = "osmo-mobile.cfg"
 
     def __init__(self, name, options, cdf_function,
diff --git a/src/osmo_ms_driver/starter.py b/src/osmo_ms_driver/starter.py
index 010947b..20977d6 100644
--- a/src/osmo_ms_driver/starter.py
+++ b/src/osmo_ms_driver/starter.py
@@ -91,6 +91,7 @@
             'test': {
                 'event_path': self._ev_server_path,
                 'lua_support': lua_support,
+                'run_lu_test': True,
             }
         }
         lua_cfg_file = os.path.join(self._tmp_dir, "lua_" + self._name_number + ".lua")

-- 
To view, visit https://gerrit.osmocom.org/13804
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190430/4351bead/attachment.htm>


More information about the gerrit-log mailing list