[V1] framework/tester: optimize scripts
Checks
Context |
Check |
Description |
ci/Intel-dts-format-test |
success
|
Testing OK
|
ci/Intel-dts-pylama-test |
success
|
Testing OK
|
ci/Intel-dts-suite-test |
success
|
Testing OK
|
Commit Message
timed out execution of Scapy "quit()" command will cause dts to end running.
method of reducing command timeout:
1. increase timeout time.
2. ensure that the "quit()" command line is executed in scapy.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
framework/tester.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -866,7 +866,9 @@ class Tester(Crb):
if self.scapy_sessions_li:
for i in self.scapy_sessions_li:
if i.session.isalive():
- i.session.send_expect("quit()", "#", timeout=2)
+ out = i.session.send_command("^C")
+ if ">>>" in out:
+ i.session.send_expect("quit()", "# ", timeout=5)
i.session.close()
self.scapy_sessions_li.clear()