[riot-notifications] [RIOT-OS/RIOT] tests: add Nordic SoftDevice test app (#11797)

Gaëtan Harter notifications at github.com
Mon Jul 22 15:38:11 CEST 2019

The script is configured to do `run(..., echo=False)` so there is never any output. This was done normally only in the `gnrc_` scapy tests.
git grep 'echo=False'
gnrc_ipv6_ext/tests/01-run.py:    sys.exit(run(testfunc, timeout=1, echo=False))
gnrc_rpl_srh/tests/01-run.py:    sys.exit(run(testfunc, timeout=1, echo=False))
gnrc_sock_dns/tests/01-run.py:    sys.exit(run(testfunc, timeout=1, echo=False))

On success there is nothing printed.
And on error you only get an error message without knowing what happened (real output I got on first try):


Timeout in expect script at "child.expect(r"Iface\s+(\d+)\s+HWaddr:")" (tests/nordic_softdevice/tests/01-run.py:10)

/home/harter/work/git/RIOT/tests/nordic_softdevice/../../Makefile.include:604: recipe for target 'test' failed
make: *** [test] Error 1
make: Leaving directory '/home/harter/work/git/RIOT/tests/nordic_softdevice'

You can see the output by applying this patch:

diff --git a/tests/nordic_softdevice/tests/01-run.py b/tests/nordic_softdevice/tests/01-run.py
index 7329c7409..cda817d1d 100755
--- a/tests/nordic_softdevice/tests/01-run.py
+++ b/tests/nordic_softdevice/tests/01-run.py
@@ -11,4 +11,4 @@ def testfunc(child):

 if __name__ == "__main__":
-    sys.exit(run(testfunc, timeout=1, echo=False))
+    sys.exit(run(testfunc, timeout=1, echo=True))

Script processing completed.

/home/harter/work/git/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-07-22 15:33:57,901 - INFO # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2019-07-22 15:34:01,623 - INFO # main(): This is RIOT! (Version: 2019.07-devel-941-gf1fc5-pr/riot/11797/add_Nordic_SoftDevice_test_app)
2019-07-22 15:34:01,628 - INFO # Test for the RIOT integration of the Nordic SoftDevice
2019-07-22 15:34:01,631 - INFO # All up, running the shell now
> ifconfig
2019-07-22 15:34:01,683 - INFO #  ifconfig
2019-07-22 15:34:01,687 - INFO # Iface  5  HWaddr: 00:FD:63:51:3C:6A

make: Leaving directory '/home/harter/work/git/RIOT/tests/nordic_softdevice'

The rest of `ifconfig` output is not printed as the script does not expect the end of the command with `child.expect('>')`.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190722/d3354e2f/attachment.htm>

More information about the notifications mailing list