Merge branch 'main' of ssh://cahute.beafrancois.fr:8329/v-and-v/testium
This commit is contained in:
@@ -77,6 +77,9 @@ main:
|
|||||||
condition: <| $(conditional_exec) == 1 |>
|
condition: <| $(conditional_exec) == 1 |>
|
||||||
console_name: consname
|
console_name: consname
|
||||||
steps:
|
steps:
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: "echo 0", timeout: 0}
|
||||||
|
{% endif %}
|
||||||
- read_until: {expected: "0", timeout: 0}
|
- read_until: {expected: "0", timeout: 0}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
|
|||||||
@@ -67,13 +67,16 @@ main:
|
|||||||
name: Console read_until immediate
|
name: Console read_until immediate
|
||||||
console_name: consname
|
console_name: consname
|
||||||
steps:
|
steps:
|
||||||
- read_until: {expected: "0", timeout: 0}
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: "echo 0", timeout: 1}
|
||||||
|
{% endif %}
|
||||||
|
- read_until: {expected: "0", timeout: 1}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console read_until immediate (2)
|
name: Console read_until immediate (2)
|
||||||
console_name: consname
|
console_name: consname
|
||||||
steps:
|
steps:
|
||||||
- read_until: {expected: "$(terminal_prompt)", timeout: 0}
|
- read_until: {expected: "$(terminal_prompt)", timeout: 1}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console closure
|
name: Console closure
|
||||||
|
|||||||
@@ -13,8 +13,13 @@ main:
|
|||||||
- open:
|
- open:
|
||||||
protocol: terminal
|
protocol: terminal
|
||||||
terminal_path: $(test_directory)
|
terminal_path: $(test_directory)
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- writeln: mkdir "$(plot_log_path)" && echo Fini
|
||||||
|
- read_until: {expected: echo Fini, timeout: 1}
|
||||||
|
{% else %}
|
||||||
- writeln: mkdir -p "$(plot_log_path)" && echo Fini
|
- writeln: mkdir -p "$(plot_log_path)" && echo Fini
|
||||||
- read_until: {expected: Fini, timeout: 5}
|
{% endif %}
|
||||||
|
- read_until: {expected: Fini, timeout: 1}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console closure
|
name: Console closure
|
||||||
|
|||||||
@@ -88,8 +88,9 @@ class TestItemConsoleOpen(TestItemConsoleAction):
|
|||||||
terminal_path = self._prms.getParam("terminal_path", processed=True)
|
terminal_path = self._prms.getParam("terminal_path", processed=True)
|
||||||
if terminal_path is not None:
|
if terminal_path is not None:
|
||||||
terminal_path = os.path.normpath(terminal_path)
|
terminal_path = os.path.normpath(terminal_path)
|
||||||
|
default_shell = "cmd.exe" if tm.OS() == "Windows" else "/usr/bin/env bash"
|
||||||
terminal_shell = self._prms.getParam(
|
terminal_shell = self._prms.getParam(
|
||||||
"shell", default="/usr/bin/env bash", required=False, processed=True
|
"shell", default=default_shell, required=False, processed=True
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import lxml
|
import lxml.html
|
||||||
|
import lxml.etree
|
||||||
import html
|
import html
|
||||||
import interpreter.test_report.report_export as rpe
|
import interpreter.test_report.report_export as rpe
|
||||||
import interpreter.test_report.test_report as tr
|
import interpreter.test_report.test_report as tr
|
||||||
|
|||||||
@@ -42,6 +42,9 @@
|
|||||||
console_name: consname
|
console_name: consname
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: echo "terminal loaded", timeout: 1}
|
||||||
|
{% endif %}
|
||||||
- read_until: {expected: terminal loaded, timeout: 5}
|
- read_until: {expected: terminal loaded, timeout: 5}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
@@ -63,6 +66,9 @@
|
|||||||
console_name: consname
|
console_name: consname
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: echo 0, timeout: 0}
|
||||||
|
{% endif %}
|
||||||
- read_until: {expected: "0", timeout: 0}
|
- read_until: {expected: "0", timeout: 0}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
|
|||||||
@@ -8,14 +8,20 @@
|
|||||||
- open:
|
- open:
|
||||||
protocol: terminal
|
protocol: terminal
|
||||||
terminal_path: $(test_directory)
|
terminal_path: $(test_directory)
|
||||||
|
{% if os == "Linux" %}
|
||||||
- writeln: echo "endOfOpen"
|
- writeln: echo "endOfOpen"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console read_until with timeout
|
name: Console read_until with timeout
|
||||||
console_name: term
|
console_name: term
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
|
{% if os == "Linux" %}
|
||||||
- read_until: {expected: endOfOpen, timeout: 5}
|
- read_until: {expected: endOfOpen, timeout: 5}
|
||||||
|
{% else %}
|
||||||
|
- read_until: {expected: $(terminal_prompt), timeout: 5}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console write
|
name: Console write
|
||||||
@@ -33,6 +39,9 @@
|
|||||||
console_name: term
|
console_name: term
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: "echo 0", timeout: 0}
|
||||||
|
{% endif %}
|
||||||
- read_until: {expected: "0", timeout: 0}
|
- read_until: {expected: "0", timeout: 0}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
@@ -61,7 +70,7 @@
|
|||||||
console_name: term
|
console_name: term
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
- read_until: {expected: "Something never prints", timeout: 1, no_fail: true}
|
- read_until: {expected: Something never prints, timeout: 1, no_fail: true}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console read_until muted
|
name: Console read_until muted
|
||||||
@@ -69,7 +78,10 @@
|
|||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
- writeln: echo "HelloConsole"
|
- writeln: echo "HelloConsole"
|
||||||
- read_until: {expected: "HelloConsole", timeout: 1, mute: true}
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: echo "HelloConsole", timeout: 1, mute: true}
|
||||||
|
{% endif %}
|
||||||
|
- read_until: {expected: HelloConsole, timeout: 1, mute: true}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console read_until muted
|
name: Console read_until muted
|
||||||
@@ -77,6 +89,9 @@
|
|||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
- writeln: echo "HelloConsole is PASS" && echo "endOfCmd"
|
- writeln: echo "HelloConsole is PASS" && echo "endOfCmd"
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
- read_until: {expected: echo "endOfCmd", timeout: 1}
|
||||||
|
{% endif %}
|
||||||
- read_until: {expected: endOfCmd, timeout: 1, process_result: "'Hello' in r'''$(result)''' and 'PASS' in r'''$(result)''' "}
|
- read_until: {expected: endOfCmd, timeout: 1, process_result: "'Hello' in r'''$(result)''' and 'PASS' in r'''$(result)''' "}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
|
|||||||
Reference in New Issue
Block a user