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 |>
|
||||
console_name: consname
|
||||
steps:
|
||||
{% if os == "Windows" %}
|
||||
- read_until: {expected: "echo 0", timeout: 0}
|
||||
{% endif %}
|
||||
- read_until: {expected: "0", timeout: 0}
|
||||
|
||||
- console:
|
||||
|
||||
@@ -67,13 +67,16 @@ main:
|
||||
name: Console read_until immediate
|
||||
console_name: consname
|
||||
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:
|
||||
name: Console read_until immediate (2)
|
||||
console_name: consname
|
||||
steps:
|
||||
- read_until: {expected: "$(terminal_prompt)", timeout: 0}
|
||||
- read_until: {expected: "$(terminal_prompt)", timeout: 1}
|
||||
|
||||
- console:
|
||||
name: Console closure
|
||||
|
||||
@@ -13,8 +13,13 @@ main:
|
||||
- open:
|
||||
protocol: terminal
|
||||
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
|
||||
- read_until: {expected: Fini, timeout: 5}
|
||||
{% endif %}
|
||||
- read_until: {expected: Fini, timeout: 1}
|
||||
|
||||
- console:
|
||||
name: Console closure
|
||||
|
||||
@@ -88,8 +88,9 @@ class TestItemConsoleOpen(TestItemConsoleAction):
|
||||
terminal_path = self._prms.getParam("terminal_path", processed=True)
|
||||
if terminal_path is not None:
|
||||
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(
|
||||
"shell", default="/usr/bin/env bash", required=False, processed=True
|
||||
"shell", default=default_shell, required=False, processed=True
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
import lxml
|
||||
import lxml.html
|
||||
import lxml.etree
|
||||
import html
|
||||
import interpreter.test_report.report_export as rpe
|
||||
import interpreter.test_report.test_report as tr
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
console_name: consname
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
{% if os == "Windows" %}
|
||||
- read_until: {expected: echo "terminal loaded", timeout: 1}
|
||||
{% endif %}
|
||||
- read_until: {expected: terminal loaded, timeout: 5}
|
||||
|
||||
- console:
|
||||
@@ -63,6 +66,9 @@
|
||||
console_name: consname
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
{% if os == "Windows" %}
|
||||
- read_until: {expected: echo 0, timeout: 0}
|
||||
{% endif %}
|
||||
- read_until: {expected: "0", timeout: 0}
|
||||
|
||||
- console:
|
||||
|
||||
@@ -8,14 +8,20 @@
|
||||
- open:
|
||||
protocol: terminal
|
||||
terminal_path: $(test_directory)
|
||||
{% if os == "Linux" %}
|
||||
- writeln: echo "endOfOpen"
|
||||
{% endif %}
|
||||
|
||||
- console:
|
||||
name: Console read_until with timeout
|
||||
console_name: term
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
{% if os == "Linux" %}
|
||||
- read_until: {expected: endOfOpen, timeout: 5}
|
||||
{% else %}
|
||||
- read_until: {expected: $(terminal_prompt), timeout: 5}
|
||||
{% endif %}
|
||||
|
||||
- console:
|
||||
name: Console write
|
||||
@@ -33,6 +39,9 @@
|
||||
console_name: term
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
{% if os == "Windows" %}
|
||||
- read_until: {expected: "echo 0", timeout: 0}
|
||||
{% endif %}
|
||||
- read_until: {expected: "0", timeout: 0}
|
||||
|
||||
- console:
|
||||
@@ -61,7 +70,7 @@
|
||||
console_name: term
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- read_until: {expected: "Something never prints", timeout: 1, no_fail: true}
|
||||
- read_until: {expected: Something never prints, timeout: 1, no_fail: true}
|
||||
|
||||
- console:
|
||||
name: Console read_until muted
|
||||
@@ -69,7 +78,10 @@
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- 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:
|
||||
name: Console read_until muted
|
||||
@@ -77,6 +89,9 @@
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- 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)''' "}
|
||||
|
||||
- console:
|
||||
|
||||
Reference in New Issue
Block a user