examples: long_wait py_func/lua_func to exercise Stop
Two extra steps in example_simple.tum that sleep for 10s, used to verify that pressing Stop interrupts engaged blocking steps.
This commit is contained in:
@@ -20,6 +20,22 @@ main:
|
|||||||
param:
|
param:
|
||||||
- 123
|
- 123
|
||||||
|
|
||||||
|
- py_func:
|
||||||
|
name: python long wait
|
||||||
|
doc: The purpose of this step is to try the tasks "stop" interruption
|
||||||
|
file: utils.py
|
||||||
|
func_name: long_wait
|
||||||
|
param:
|
||||||
|
- 10
|
||||||
|
|
||||||
|
- lua_func:
|
||||||
|
name: lua long wait
|
||||||
|
doc: The purpose of this step is to try the tasks "stop" interruption
|
||||||
|
file: lua_func.lua
|
||||||
|
func_name: long_wait
|
||||||
|
param:
|
||||||
|
- 10
|
||||||
|
|
||||||
- sleep:
|
- sleep:
|
||||||
name: sleep item
|
name: sleep item
|
||||||
dialog: true
|
dialog: true
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
tm = require("tm")
|
tm = require("tm")
|
||||||
|
socket = require("socket")
|
||||||
|
|
||||||
local module = {}
|
local module = {}
|
||||||
|
|
||||||
@@ -7,4 +8,8 @@ function module.func_to_be_executed(param)
|
|||||||
return param
|
return param
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function module.long_wait(sec)
|
||||||
|
socket.sleep(sec)
|
||||||
|
end
|
||||||
|
|
||||||
return module
|
return module
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
from time import sleep
|
||||||
|
|
||||||
def dummy_exit(useless1, useless2):
|
def dummy_exit(useless1, useless2):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -10,4 +12,7 @@ def funcToBeExecuted (bla):
|
|||||||
|
|
||||||
def funcToBeExecuted2 (bla):
|
def funcToBeExecuted2 (bla):
|
||||||
print(bla)
|
print(bla)
|
||||||
return blo
|
return blo
|
||||||
|
|
||||||
|
def long_wait (sec):
|
||||||
|
sleep(sec)
|
||||||
Reference in New Issue
Block a user