Allow floating number for console timeout
This commit is contained in:
@@ -300,7 +300,7 @@ class TestItemConsoleReadUntil(TestItemConsoleAction):
|
|||||||
def execute(self):
|
def execute(self):
|
||||||
cons = self.get_console()
|
cons = self.get_console()
|
||||||
ru = self._prms.expanse(self._read_until)
|
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)
|
mute = self._prms.getParam("mute", default=False, processed=True)
|
||||||
if read_timeout < 0:
|
if read_timeout < 0:
|
||||||
read_timeout = None
|
read_timeout = None
|
||||||
|
|||||||
@@ -84,7 +84,18 @@
|
|||||||
- read_until: {expected: HelloConsole, timeout: 1, mute: true}
|
- read_until: {expected: HelloConsole, timeout: 1, mute: true}
|
||||||
|
|
||||||
- console:
|
- 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
|
console_name: term
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user