From e524f2ca594a31c0cacabb4dde78dd5d9145ed0a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 27 Apr 2019 15:44:44 +0100 Subject: 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 --- src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl (limited to 'src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl') diff --git a/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl new file mode 100644 index 0000000..0adb895 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl @@ -0,0 +1,25 @@ +package.path = '${test.lua_support}/?.lua;' .. package.path +event = require('ms_support') +send = 1 + + +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 +} +osmo.ms():register(cbs) +osmo.ms().start() + +event.register(osmo.ms():number(), "${test.event_path}") -- cgit v1.2.3