1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/nordic_softdevice: cleanup test script and fix test

Adding a 1s delay before sending ifconfig makes this test works reliably because it gives the softdevice enough time to get in a ready state.
This commit is contained in:
Alexandre Abadie 2019-10-16 08:20:41 +02:00
parent 97d5040525
commit 98e17c2736
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -1,14 +1,17 @@
#!/usr/bin/env python3
import sys
import time
from testrunner import run
def testfunc(child):
child.expect("All up, running the shell now")
child.expect_exact("All up, running the shell now")
child.expect_exact(">")
time.sleep(1) # Wait 1s to let some time for the interface to be fully ready
child.sendline("ifconfig")
child.expect(r"Iface\s+(\d+)\s+HWaddr:")
if __name__ == "__main__":
sys.exit(run(testfunc, timeout=1, echo=False))
sys.exit(run(testfunc))