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