3 Commits

9 changed files with 34 additions and 15 deletions

View File

@@ -9,9 +9,9 @@ This element is of the following form:
- let:
name: Let Item
values:
key1: value1
key2: value2
key3: <| $(variable)[$(loop_index)] |>
- key1: value1
- key2: value2
- key3: <| $(variable)[$(loop_index)] |>
The ``let`` element is used to set values in the global directory.

View File

@@ -51,8 +51,8 @@ The parameter file can be specified in the `.tum` file root:
:caption: configuration files definition in the main `.tum` test file
config_file:
config1.yaml
config2.yaml
- config1.yaml
- config2.yaml
main:
name: Test example

View File

@@ -344,7 +344,7 @@ class TestItemConsoleReadUntil(TestItemConsoleAction):
def execute(self):
cons = self.get_console()
ru = self._prms.expanse(self._read_until)
read_timeout = int(self._prms.getParam("timeout", default=-1, processed=True))
read_timeout = float(self._prms.getParam("timeout", default=-1, processed=True))
mute = self._prms.getParam("mute", default=False, processed=True)
if read_timeout < 0:
read_timeout = None

View File

@@ -51,14 +51,18 @@ class TestFileManager:
w.disconnect_signals()
# Snapshot user-selected checkboxes and fold state so they survive a
# reload of the same file (same logic as session-restore through prefs).
# checkList works only if show_checkboxes is True
previous_check_list = w.treeTests.getCheckList()
previous_fold_list = w.treeTests.getFoldList()
previous_count = w.treeTests.getItemCount()
self.clear_process()
if self.load(file_name) and w.test_service is not None:
if w.treeTests.getItemCount() == previous_count:
w.treeTests.restoreCheckList(previous_check_list, w.test_service)
if self.load(file_name) and \
w.test_service is not None and \
w.treeTests.getItemCount() == previous_count:
if prefs.settings.show_checkboxes :
w.treeTests.restoreCheckList(previous_check_list, w.test_service)
w.treeTests.restoreFoldList(previous_fold_list)
w.reconnect_signals()
def _make_progress(self, w):

View File

@@ -84,7 +84,18 @@
- read_until: {expected: HelloConsole, timeout: 1, mute: true}
- console:
name: Console read_until muted
name: Console read_until float timeout
console_name: term
key: $(test)_PASS
steps:
- writeln: echo "HelloConsole"
{% if os == "Windows" %}
- read_until: {expected: echo "HelloConsole", timeout: 0.2}
{% endif %}
- read_until: {expected: HelloConsole, timeout: 0.2}
- console:
name: Console read_until process result
console_name: term
key: $(test)_PASS
steps:

View File

@@ -11,8 +11,8 @@
- let:
name: Let it be
values:
it: $(loop_param)
be: <| $(loop_param) == $(it) |>
- it: $(loop_param)
- be: <| $(loop_param) == $(it) |>
- loop:
name: Cycle iterating on list

View File

@@ -1,7 +1,7 @@
- let:
name: lua_func test constants,
values:
lua_func test parameter: test parameter lua_func
- lua_func test parameter: test parameter lua_func
- lua_func:
name: fail lua_func

View File

@@ -1,7 +1,7 @@
- let:
name: py_func test constants,
values:
py_func test parameter: test parameter
- py_func test parameter: test parameter
- py_func:
name: pass py_func

View File

@@ -31,7 +31,11 @@ main:
{% for item in items %}
# item test
- let: {name: {{ item }} test constants, values: {test: {{ item }}, test_path: items/$(test)}}
- let:
name: {{ item }} test constants
values:
- test: {{ item }}
- test_path: items/$(test)
- group:
name: {{ item }} test
steps: