Changed (once again) the evaluation delimiters (<| and |>)
This commit is contained in:
@@ -10,12 +10,12 @@ main:
|
||||
|
||||
- let:
|
||||
name: Set test variables for Linux
|
||||
condition: $| "$(os)" == "Linux" |
|
||||
condition: <| "$(os)" == "Linux" |>
|
||||
values:
|
||||
- terminal_prompt: $(linux_prompt)
|
||||
- let:
|
||||
name: Set test variables for Windows
|
||||
condition: $| "$(os)" == "Windows" |
|
||||
condition: <| "$(os)" == "Windows" |>
|
||||
values:
|
||||
- terminal_prompt: $(windows_prompt)
|
||||
|
||||
@@ -35,17 +35,17 @@ main:
|
||||
no_fail: True
|
||||
|
||||
exit_condition:
|
||||
value: $| "$(last_test_result)" == "PASS" |
|
||||
value: <| "$(last_test_result)" == "PASS" |>
|
||||
|
||||
|
||||
- let:
|
||||
name: let
|
||||
values:
|
||||
- conditional_exec: $| random.randint(1, 4) |
|
||||
- conditional_exec: <| random.randint(1, 4) |>
|
||||
|
||||
- console:
|
||||
name: Console creation
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
doc: Opening the console
|
||||
steps:
|
||||
@@ -55,56 +55,56 @@ main:
|
||||
|
||||
- console:
|
||||
name: Console read_until with timeout
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
- read_until: {expected: "$(terminal_prompt)", timeout: 10}
|
||||
|
||||
- console:
|
||||
name: Console write
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
- writeln: echo 0
|
||||
|
||||
- sleep:
|
||||
name: sleep item
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
timeout: 5
|
||||
|
||||
- console:
|
||||
name: Console read_until immediate
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
- read_until: {expected: "0", timeout: 0}
|
||||
|
||||
- console:
|
||||
name: Console read_until immediate (2)
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
- read_until: {expected: "$(terminal_prompt)", timeout: 0}
|
||||
|
||||
- console:
|
||||
name: Console closure
|
||||
condition: $| $(conditional_exec) == 1 |
|
||||
condition: <| $(conditional_exec) == 1 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
- close: consname
|
||||
|
||||
- sleep:
|
||||
name: sleep item
|
||||
condition: $| $(conditional_exec) == 2 |
|
||||
condition: <| $(conditional_exec) == 2 |>
|
||||
timeout: 5
|
||||
|
||||
- dialog_image:
|
||||
name: dialog image item
|
||||
condition: $| $(conditional_exec) == 3 |
|
||||
condition: <| $(conditional_exec) == 3 |>
|
||||
question: click ok if you see the image
|
||||
filename: image.jpg
|
||||
|
||||
- dialog_value:
|
||||
name: dialog_value item
|
||||
condition: $| $(conditional_exec) == 4 |
|
||||
condition: <| $(conditional_exec) == 4 |>
|
||||
question: enter something and click ok
|
||||
@@ -139,7 +139,7 @@ main:
|
||||
timeout: 0.2
|
||||
dialog: false
|
||||
exit_condition:
|
||||
value: $| $(variable) >= 10 |
|
||||
value: <| $(variable) >= 10 |>
|
||||
|
||||
# This loop must fail du to an exception in exit condition.
|
||||
- loop:
|
||||
|
||||
@@ -16,7 +16,7 @@ main:
|
||||
|
||||
- group:
|
||||
name: Set test variables for Linux
|
||||
condition: $| "$(os)" == "Linux" |
|
||||
condition: <| "$(os)" == "Linux" |>
|
||||
steps:
|
||||
|
||||
- let:
|
||||
@@ -26,7 +26,7 @@ main:
|
||||
|
||||
- group:
|
||||
name: Set test variables for Windows
|
||||
condition: $| "$(os)" == "Windows" |
|
||||
condition: <| "$(os)" == "Windows" |>
|
||||
steps:
|
||||
|
||||
- let:
|
||||
|
||||
@@ -22,6 +22,6 @@ main:
|
||||
- *seq_sleep
|
||||
|
||||
exit_condition:
|
||||
value: $| $(variable) >= 3 |
|
||||
value: <| $(variable) >= 3 |>
|
||||
|
||||
- !include {file: seq2.tum, is_dialog: True, sleep_timeout: 12, func_para: truc}
|
||||
@@ -23,5 +23,5 @@ main:
|
||||
- sleep:
|
||||
name: sleep item
|
||||
dialog: true
|
||||
timeout: $| 3600 + random.randint(1, 10) |
|
||||
timeout: <| 3600 + random.randint(1, 10) |>
|
||||
no_fail: true
|
||||
|
||||
@@ -21,9 +21,9 @@ main:
|
||||
- let:
|
||||
name: Extract data
|
||||
values:
|
||||
- text_extract: $| [l for l in '''$(rand_text)'''.splitlines() if '$(text_searched)' in l][0] |
|
||||
- text_extract: <| [l for l in '''$(rand_text)'''.splitlines() if '$(text_searched)' in l][0] |>
|
||||
|
||||
- dialog_message:
|
||||
condition: $| len('$(text_extract)') > 0 |
|
||||
condition: <| len('$(text_extract)') > 0 |>
|
||||
name: dialog value test item
|
||||
question: Tataaaaa !
|
||||
@@ -8,7 +8,7 @@ This element is of the following form:
|
||||
|
||||
- group:
|
||||
name: Group Item
|
||||
condition: $| "$(OS)" == "Linux" |
|
||||
condition: <| "$(OS)" == "Linux" |>
|
||||
steps:
|
||||
- unittest_file:
|
||||
test_file: test_prod_alpha_13.py
|
||||
|
||||
@@ -196,8 +196,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
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ This element is of the following form:
|
||||
values:
|
||||
key1: value1
|
||||
key2: value2
|
||||
key3: $| $(variable)[$(loop_index)] |
|
||||
key3: <| $(variable)[$(loop_index)] |>
|
||||
|
||||
The ``let`` element is used to set values in the global directory.
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -205,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
|
||||
@@ -218,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.
Reference in New Issue
Block a user