removed support of xml and json config.

Changed the evaluation pattern to $|x|.
This commit is contained in:
2026-01-04 15:10:11 +01:00
parent 5a86e498d2
commit 0459c9ff27
19 changed files with 37 additions and 129 deletions

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" ?>
<root>
<parameter name="func_param" value="param"/>
</root>

View File

@@ -0,0 +1 @@
func_param: param

View File

@@ -2,10 +2,8 @@
#
config_file:
- param.xml
- param.yaml
- param.json
- $(test_directory)/dummy/param_func.xml
- $(test_directory)/dummy/param_func.yaml
main:
name: Test Sample number one

View File

@@ -1,4 +0,0 @@
{
"global_loop_param_list": [["one", "two", "three"],[1, 2, 3]]
}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" ?>
<root>
<!-- ****************************************************************************
Test configuration
**************************************************************************** -->
<parameter name="windows_prompt" value=">"/>
<parameter name="linux_prompt" value="$"/>
<parameter name="sequence" value="tm.tum"/>
</root>

View File

@@ -2,7 +2,12 @@
#****************************************************************************
# Test configuration
#**************************************************************************** -->
windows_prompt: >
linux_prompt: $
sequence: tm.tum
# loops parameters
global_loop_param_list: [["one", "two", "three"], [1, 2, 3]]
global_loop_param_txt: ['one', 'two', 'three']
global_loop_param_num: [1, 2, 3]

View File

@@ -34,7 +34,7 @@ sequences of tests can be called interactively.
:caption: call a test in terminal mode
$ testium -m
Configuration file loaded: /my/execution/path/param.xml
Configuration file loaded: /my/execution/path/param.yaml
[...]
================================================================================
====== Test configuration

View File

@@ -195,8 +195,8 @@ Export attribute
key:
- GID-1510554_step_1
report:
reported_list: @| random.sample(range(0,20), k=10) |
reported_float: @| math.sqrt(float(1)) |
reported_list: $| random.sample(range(0,20), k=10) |
reported_float: $| math.sqrt(float(1)) |
reported_str: This is my reported sentence

View File

@@ -70,7 +70,7 @@ Some global variables have an impact on the ``lua_func`` test item behavior:
* ``lua_path``: This optional global variable can be used to define
the lua executable path. If not defined, the lua interpreter is
searched in at the default place in the system.
searched in at the default place in the system.
* ``lua_env``: This global variable can be used to define
environment variables for the lua script execution environment.
Only `PATH`, `LUA_PATH`, and `LUA_CPATH` are supported.

View File

@@ -39,7 +39,7 @@ Configuration files
A configuration file can be specified in the `.tum` file or by the command line.
This configuration file is optional and must be a YAML file.
The type of file is recognized by the file name extension `.yaml`.
The configuration files must have the `.yaml` or `.yml` file name extension.
During the test script loading process, the values defined in these configuration files
are added to the global variables and are then accessible from the test items and scripts
@@ -63,7 +63,7 @@ The parameter file can be specified in the `.tum` file root:
parameter1: value1
parameter2: 1234
parameter3: @| 12.34 * 2 |
parameter3: $| 12.34 * 2 |
parameter4:
- $(parameter1)
- $(parameter3)
@@ -106,8 +106,11 @@ Another possible usage of the global variables is to share persistent data betwe
A library allowing python functions to access global variables is available from the
python scripts. See details in section :ref:`helper library<sec_python_helper_library>`.
Apart from the value obtained from the param.xml file, the global varibles entries
contains also built-in specific value, and test item specific values.
Apart from the value obtained from the default `param.yaml` or defined configuration files,
the global variables entries contains also
* built-in specific value (see :ref:`below<sec_global_variables_builtin>`),
* values returned by test items.
.. _sec_global_variables_builtin:
@@ -202,7 +205,7 @@ The variable substitution is recursive and checks all the occurrences of the
``$(x)`` pattern in a string.
It is also possible to perform evaluation of python substrings during parameters passing.
It is done by using the ``@| expr |`` pattern in a string.
It is done by using the ``$| expr |`` pattern in a string.
`expr` may then be a correct python expression.
Below are illustrated simple and more complicated cases of expansion and evaluation depending on
@@ -215,10 +218,10 @@ their pattern.
name: Dynamic variables expansion
key: $(test)_PASS
values:
- expanse_select: @|"$(expanse_select)".replace("o", "a")|
- expanse_select: $|"$(expanse_select)".replace("o", "a")|
- expanse_index: $(expanse_index_$(expanse_select))
- expanse_table: $(expanse_table_$(expanse_select))
- expanse_eval: @|$(expanse_index) == 1|
- expanse_eval: $|$(expanse_index) == 1|
Test Items
--------------------

Binary file not shown.