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
This commit is contained in:
Holger Hans Peter Freyther 2019-04-27 15:44:44 +01:00
parent 839d6fa405
commit e524f2ca59
3 changed files with 10 additions and 2 deletions

View File

@ -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
}

View File

@ -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,

View File

@ -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")