aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-04-27 15:44:44 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-04-28 15:51:58 +0100
commite524f2ca594a31c0cacabb4dde78dd5d9145ed0a (patch)
treea18c61c538412414e6edd4fcba22c69ea01b627c
parent839d6fa4050014a0807b9778c16a6660528d4109 (diff)
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
-rw-r--r--src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl (renamed from src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl)9
-rw-r--r--src/osmo_ms_driver/location_update_test.py2
-rw-r--r--src/osmo_ms_driver/starter.py1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl b/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 @@ package.path = '${test.lua_support}/?.lua;' .. package.path
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 @@ class MassUpdateLocationTest(log.Origin):
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 @@ class OsmoMobile(Launcher):
'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")