From 3893f04d00a3bb09f12bc341f881d41acb05f8f3 Mon Sep 17 00:00:00 2001 From: smlng Date: Fri, 10 Aug 2018 14:23:13 +0200 Subject: [PATCH] tests: move testrunner import up Testrunner is now impported as a package found in PYTHONPATH, so import can be placed at the top of the script as usual. --- tests/bench_msg_pingpong/tests/01-run.py | 2 +- tests/bench_mutex_pingpong/tests/01-run.py | 2 +- tests/bench_sched_nop/tests/01-run.py | 2 +- tests/bench_thread_flags_pingpong/tests/01-run.py | 2 +- tests/bench_thread_yield_pingpong/tests/01-run.py | 2 +- tests/bitarithm_timings/tests/01-run.py | 2 +- tests/bloom_bytes/tests/01-run.py | 3 +-- tests/buttons/tests/01-run.py | 2 +- tests/cb_mux/tests/01-run.py | 2 +- tests/cb_mux_bench/tests/01-run.py | 2 +- tests/cbor/tests/01-run.py | 2 +- tests/cpp11_condition_variable/tests/01-run.py | 2 +- tests/cpp11_mutex/tests/01-run.py | 2 +- tests/cpp11_thread/tests/01-run.py | 2 +- tests/driver_ds1307/tests/01-run.py | 2 +- tests/driver_grove_ledbar/tests/01-run.py | 2 +- tests/driver_hd44780/tests/01-run.py | 2 +- tests/driver_my9221/tests/01-run.py | 2 +- tests/events/tests/01-run.py | 2 +- tests/evtimer_msg/tests/01-run.py | 2 +- tests/evtimer_underflow/tests/01-run.py | 2 +- tests/float/tests/01-run.py | 2 +- tests/fmt_print/tests/01-run.py | 2 +- tests/gnrc_ipv6_ext/tests/01-run.py | 2 +- tests/gnrc_ipv6_nib/tests/01-run.py | 2 +- tests/gnrc_ipv6_nib_6ln/tests/01-run.py | 2 +- tests/gnrc_ndp/tests/01-run.py | 2 +- tests/gnrc_netif/tests/01-run.py | 2 +- tests/gnrc_sixlowpan/tests/01-run.py | 2 +- tests/gnrc_sock_ip/tests/01-run.py | 2 +- tests/gnrc_sock_udp/tests/01-run.py | 2 +- tests/irq/tests/01-run.py | 2 +- tests/isr_yield_higher/tests/test.py | 2 +- tests/libc_newlib/tests/01-run.py | 2 +- tests/libfixmath/tests/01-run.py | 2 +- tests/libfixmath_unittests/tests/01-run.py | 2 +- tests/lwip_sock_ip/tests/01-run.py | 2 +- tests/lwip_sock_tcp/tests/01-run.py | 2 +- tests/lwip_sock_udp/tests/01-run.py | 2 +- tests/msg_avail/tests/01-run.py | 2 +- tests/msg_send_receive/tests/01-run.py | 2 +- tests/msg_try_receive/tests/01-run.py | 2 +- tests/mutex_order/tests/01-run.py | 3 ++- tests/mutex_unlock_and_sleep/tests/01-run.py | 2 +- tests/netdev_test/tests/01-run.py | 2 +- tests/netstats_l2/tests/01-run.py | 2 +- tests/nhdp/tests/01-run.py | 2 +- tests/od/tests/01-run.py | 2 +- tests/od/tests/02-run.py | 2 +- tests/periph_gpio/tests/02-bench.py | 2 +- tests/periph_timer/tests/01-run.py | 2 +- tests/pipe/tests/01-run.py | 2 +- tests/pkg_cayenne-lpp/tests/01-run.py | 2 +- tests/pkg_fatfs_vfs/tests/01-run.py | 4 ++-- tests/pkg_jsmn/tests/01-run.py | 2 +- tests/pkg_libcoap/tests/01-run.py | 2 +- tests/pkg_micro-ecc-with-hwrng/tests/01-run.py | 2 +- tests/pkg_micro-ecc/tests/01-run.py | 2 +- tests/pkg_minmea/tests/01-run.py | 2 +- tests/pkg_monocypher/tests/01-run.py | 2 +- tests/pkg_tiny-asn1/tests/01-run.py | 2 +- tests/pkg_tinycbor/tests/01-run.py | 2 +- tests/pkg_tinycrypt/tests/01-run.py | 2 +- tests/pkg_u8g2/tests/01-run.py | 2 +- tests/pkg_ucglib/tests/01-run.py | 2 +- tests/pkg_umorse/tests/01-run.py | 2 +- tests/posix_semaphore/tests/01-run.py | 2 +- tests/posix_time/tests/01-run.py | 2 +- tests/ps_schedstatistics/tests/01-run.py | 2 +- tests/pthread/tests/01-run.py | 2 +- tests/pthread_barrier/tests/01-run.py | 2 +- tests/pthread_cleanup/tests/01-run.py | 2 +- tests/pthread_condition_variable/tests/01-run.py | 2 +- tests/pthread_cooperation/tests/01-run.py | 2 +- tests/pthread_rwlock/tests/01-run.py | 2 +- tests/pthread_tls/tests/01-run.py | 2 +- tests/rmutex/tests/01-run.py | 3 ++- tests/rng/tests/01-run.py | 2 +- tests/sched_testing/tests/01-run.py | 2 +- tests/shell/tests/01-run.py | 3 ++- tests/sizeof_tcb/tests/01-run.py | 2 +- tests/socket_zep/tests/01-run.py | 7 +++---- tests/ssp/tests/01-run.py | 2 +- tests/struct_tm_utility/tests/01-run.py | 2 +- tests/thread_basic/tests/01-run.py | 2 +- tests/thread_cooperation/tests/01-run.py | 2 +- tests/thread_exit/tests/01-run.py | 2 +- tests/thread_flags/tests/01-run.py | 2 +- tests/thread_flags_xtimer/tests/01-run.py | 2 +- tests/thread_flood/tests/01-run.py | 2 +- tests/thread_msg/tests/01-run.py | 2 +- tests/thread_msg_block_w_queue/tests/01-run.py | 2 +- tests/thread_msg_block_wo_queue/tests/01-run.py | 2 +- tests/thread_msg_seq/tests/01-run.py | 2 +- tests/thread_race/tests/01-run.py | 2 +- tests/trace/tests/01-run.py | 4 ++-- tests/trickle/tests/01-run.py | 2 +- tests/unittests/tests/01-run.py | 2 +- tests/xtimer_hang/tests/01-run.py | 2 +- tests/xtimer_msg/tests/01-run.py | 2 +- tests/xtimer_msg_receive_timeout/tests/01-run.py | 2 +- tests/xtimer_now64_continuity/tests/01-run.py | 2 +- tests/xtimer_periodic_wakeup/tests/01-run.py | 2 +- tests/xtimer_remove/tests/01-run.py | 2 +- tests/xtimer_reset/tests/01-run.py | 2 +- tests/xtimer_usleep/tests/01-run.py | 3 ++- tests/xtimer_usleep_short/tests/01-run.py | 2 +- 107 files changed, 115 insertions(+), 113 deletions(-) diff --git a/tests/bench_msg_pingpong/tests/01-run.py b/tests/bench_msg_pingpong/tests/01-run.py index 7332378b99..f2d9f5b121 100755 --- a/tests/bench_msg_pingpong/tests/01-run.py +++ b/tests/bench_msg_pingpong/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/bench_mutex_pingpong/tests/01-run.py b/tests/bench_mutex_pingpong/tests/01-run.py index 7332378b99..f2d9f5b121 100755 --- a/tests/bench_mutex_pingpong/tests/01-run.py +++ b/tests/bench_mutex_pingpong/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/bench_sched_nop/tests/01-run.py b/tests/bench_sched_nop/tests/01-run.py index 7332378b99..f2d9f5b121 100755 --- a/tests/bench_sched_nop/tests/01-run.py +++ b/tests/bench_sched_nop/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/bench_thread_flags_pingpong/tests/01-run.py b/tests/bench_thread_flags_pingpong/tests/01-run.py index 7332378b99..f2d9f5b121 100755 --- a/tests/bench_thread_flags_pingpong/tests/01-run.py +++ b/tests/bench_thread_flags_pingpong/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/bench_thread_yield_pingpong/tests/01-run.py b/tests/bench_thread_yield_pingpong/tests/01-run.py index 7332378b99..f2d9f5b121 100755 --- a/tests/bench_thread_yield_pingpong/tests/01-run.py +++ b/tests/bench_thread_yield_pingpong/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/bitarithm_timings/tests/01-run.py b/tests/bitarithm_timings/tests/01-run.py index 9e1cd77b3d..127cf3e053 100755 --- a/tests/bitarithm_timings/tests/01-run.py +++ b/tests/bitarithm_timings/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -18,5 +19,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=30)) diff --git a/tests/bloom_bytes/tests/01-run.py b/tests/bloom_bytes/tests/01-run.py index 699eb2ee21..4e78f0722e 100755 --- a/tests/bloom_bytes/tests/01-run.py +++ b/tests/bloom_bytes/tests/01-run.py @@ -7,7 +7,7 @@ # directory for more details. import sys - +from testrunner import run # Biggest step takes 135 seconds on wn430 TIMEOUT = 150 @@ -25,5 +25,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/buttons/tests/01-run.py b/tests/buttons/tests/01-run.py index 4697ef690f..e0e2448140 100755 --- a/tests/buttons/tests/01-run.py +++ b/tests/buttons/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -21,5 +22,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cb_mux/tests/01-run.py b/tests/cb_mux/tests/01-run.py index 989ddecb8c..646f7890e0 100755 --- a/tests/cb_mux/tests/01-run.py +++ b/tests/cb_mux/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -38,5 +39,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cb_mux_bench/tests/01-run.py b/tests/cb_mux_bench/tests/01-run.py index b0e0518bf7..5ad729bdd3 100755 --- a/tests/cb_mux_bench/tests/01-run.py +++ b/tests/cb_mux_bench/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -19,5 +20,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cbor/tests/01-run.py b/tests/cbor/tests/01-run.py index fdef422e3b..d5982793e2 100755 --- a/tests/cbor/tests/01-run.py +++ b/tests/cbor/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run ACCEPTED_ERROR = 20 @@ -49,5 +50,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cpp11_condition_variable/tests/01-run.py b/tests/cpp11_condition_variable/tests/01-run.py index 90f5ebec68..f0d3989a2d 100755 --- a/tests/cpp11_condition_variable/tests/01-run.py +++ b/tests/cpp11_condition_variable/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -25,5 +26,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cpp11_mutex/tests/01-run.py b/tests/cpp11_mutex/tests/01-run.py index 65990091c7..1e741de37e 100755 --- a/tests/cpp11_mutex/tests/01-run.py +++ b/tests/cpp11_mutex/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -21,5 +22,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/cpp11_thread/tests/01-run.py b/tests/cpp11_thread/tests/01-run.py index f6d92f5571..91303e39d9 100755 --- a/tests/cpp11_thread/tests/01-run.py +++ b/tests/cpp11_thread/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -33,5 +34,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/driver_ds1307/tests/01-run.py b/tests/driver_ds1307/tests/01-run.py index d234526e0b..87ecdb87cc 100755 --- a/tests/driver_ds1307/tests/01-run.py +++ b/tests/driver_ds1307/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/driver_grove_ledbar/tests/01-run.py b/tests/driver_grove_ledbar/tests/01-run.py index 8141bffd57..1c1a36b0ca 100755 --- a/tests/driver_grove_ledbar/tests/01-run.py +++ b/tests/driver_grove_ledbar/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/driver_hd44780/tests/01-run.py b/tests/driver_hd44780/tests/01-run.py index 29c6ba53ef..8f6a837f3e 100755 --- a/tests/driver_hd44780/tests/01-run.py +++ b/tests/driver_hd44780/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -16,5 +17,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/driver_my9221/tests/01-run.py b/tests/driver_my9221/tests/01-run.py index 7592b61fbc..e6ef129dae 100755 --- a/tests/driver_my9221/tests/01-run.py +++ b/tests/driver_my9221/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/events/tests/01-run.py b/tests/events/tests/01-run.py index b97b0a1d1d..a8c5d9b211 100755 --- a/tests/events/tests/01-run.py +++ b/tests/events/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/evtimer_msg/tests/01-run.py b/tests/evtimer_msg/tests/01-run.py index ce2736c1b6..cc89181dba 100755 --- a/tests/evtimer_msg/tests/01-run.py +++ b/tests/evtimer_msg/tests/01-run.py @@ -8,6 +8,7 @@ from __future__ import print_function import sys +from testrunner import run ACCEPTED_ERROR = 20 @@ -29,5 +30,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/evtimer_underflow/tests/01-run.py b/tests/evtimer_underflow/tests/01-run.py index 04e79d32b9..a20360e230 100755 --- a/tests/evtimer_underflow/tests/01-run.py +++ b/tests/evtimer_underflow/tests/01-run.py @@ -8,6 +8,7 @@ from __future__ import print_function import sys +from testrunner import run how_many = 100 @@ -23,5 +24,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/float/tests/01-run.py b/tests/float/tests/01-run.py index ffbfae9bc0..f66775af55 100755 --- a/tests/float/tests/01-run.py +++ b/tests/float/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run # It takes 35 seconds on wsn430, so add some margin TIMEOUT = 45 @@ -18,5 +19,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/fmt_print/tests/01-run.py b/tests/fmt_print/tests/01-run.py index 12209df798..9f6f3d7348 100755 --- a/tests/fmt_print/tests/01-run.py +++ b/tests/fmt_print/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -9,5 +10,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_ipv6_ext/tests/01-run.py b/tests/gnrc_ipv6_ext/tests/01-run.py index b0277af8ee..f27fe3c5b0 100755 --- a/tests/gnrc_ipv6_ext/tests/01-run.py +++ b/tests/gnrc_ipv6_ext/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -38,5 +39,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_ipv6_nib/tests/01-run.py b/tests/gnrc_ipv6_nib/tests/01-run.py index 7df19bc0bf..6d8b056e2d 100755 --- a/tests/gnrc_ipv6_nib/tests/01-run.py +++ b/tests/gnrc_ipv6_nib/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_ipv6_nib_6ln/tests/01-run.py b/tests/gnrc_ipv6_nib_6ln/tests/01-run.py index 7df19bc0bf..6d8b056e2d 100755 --- a/tests/gnrc_ipv6_nib_6ln/tests/01-run.py +++ b/tests/gnrc_ipv6_nib_6ln/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_ndp/tests/01-run.py b/tests/gnrc_ndp/tests/01-run.py index c36c003427..022ebe7a89 100755 --- a/tests/gnrc_ndp/tests/01-run.py +++ b/tests/gnrc_ndp/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -16,5 +17,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_netif/tests/01-run.py b/tests/gnrc_netif/tests/01-run.py index 7c722a6ffb..36ce840217 100755 --- a/tests/gnrc_netif/tests/01-run.py +++ b/tests/gnrc_netif/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -137,5 +138,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=1, traceback=True)) diff --git a/tests/gnrc_sixlowpan/tests/01-run.py b/tests/gnrc_sixlowpan/tests/01-run.py index 2254e0e2ef..c668cb8254 100755 --- a/tests/gnrc_sixlowpan/tests/01-run.py +++ b/tests/gnrc_sixlowpan/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -75,5 +76,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_sock_ip/tests/01-run.py b/tests/gnrc_sock_ip/tests/01-run.py index 7daf6b0f27..9d661f3f38 100755 --- a/tests/gnrc_sock_ip/tests/01-run.py +++ b/tests/gnrc_sock_ip/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -48,5 +49,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/gnrc_sock_udp/tests/01-run.py b/tests/gnrc_sock_udp/tests/01-run.py index 890ee64664..d4592652e4 100755 --- a/tests/gnrc_sock_udp/tests/01-run.py +++ b/tests/gnrc_sock_udp/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -52,5 +53,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/irq/tests/01-run.py b/tests/irq/tests/01-run.py index 164d335653..bcc3f49769 100755 --- a/tests/irq/tests/01-run.py +++ b/tests/irq/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -9,5 +10,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/isr_yield_higher/tests/test.py b/tests/isr_yield_higher/tests/test.py index 7df1e1b5c4..14cec5778a 100755 --- a/tests/isr_yield_higher/tests/test.py +++ b/tests/isr_yield_higher/tests/test.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -17,5 +18,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/libc_newlib/tests/01-run.py b/tests/libc_newlib/tests/01-run.py index 3cb9911b3b..5aedfe8869 100755 --- a/tests/libc_newlib/tests/01-run.py +++ b/tests/libc_newlib/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -14,5 +15,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/libfixmath/tests/01-run.py b/tests/libfixmath/tests/01-run.py index 147d68672d..29213751f7 100755 --- a/tests/libfixmath/tests/01-run.py +++ b/tests/libfixmath/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def expect_unary(child): @@ -38,5 +39,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/libfixmath_unittests/tests/01-run.py b/tests/libfixmath_unittests/tests/01-run.py index 43c877c5a1..5ee57f9dfb 100755 --- a/tests/libfixmath_unittests/tests/01-run.py +++ b/tests/libfixmath_unittests/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run # Float and print operations are slow on boards # Got 80 iotlab-m3 and 250 on samr21-xpro @@ -18,5 +19,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/lwip_sock_ip/tests/01-run.py b/tests/lwip_sock_ip/tests/01-run.py index 973c5db842..f33598cece 100755 --- a/tests/lwip_sock_ip/tests/01-run.py +++ b/tests/lwip_sock_ip/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def _ipv6_tests(code): @@ -96,5 +97,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/lwip_sock_tcp/tests/01-run.py b/tests/lwip_sock_tcp/tests/01-run.py index 1e3cba2f14..c9da01e205 100755 --- a/tests/lwip_sock_tcp/tests/01-run.py +++ b/tests/lwip_sock_tcp/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def _reuse_tests(code): @@ -90,5 +91,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=60)) diff --git a/tests/lwip_sock_udp/tests/01-run.py b/tests/lwip_sock_udp/tests/01-run.py index eb81e986c5..5fba61af8b 100755 --- a/tests/lwip_sock_udp/tests/01-run.py +++ b/tests/lwip_sock_udp/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def _reuse_tests(code): @@ -108,5 +109,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/msg_avail/tests/01-run.py b/tests/msg_avail/tests/01-run.py index b97b0a1d1d..a8c5d9b211 100755 --- a/tests/msg_avail/tests/01-run.py +++ b/tests/msg_avail/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/msg_send_receive/tests/01-run.py b/tests/msg_send_receive/tests/01-run.py index 30ba904615..5dcb3a9dcf 100755 --- a/tests/msg_send_receive/tests/01-run.py +++ b/tests/msg_send_receive/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -14,5 +15,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/msg_try_receive/tests/01-run.py b/tests/msg_try_receive/tests/01-run.py index 3c736de0e2..887db6ff79 100755 --- a/tests/msg_try_receive/tests/01-run.py +++ b/tests/msg_try_receive/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -9,5 +10,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/mutex_order/tests/01-run.py b/tests/mutex_order/tests/01-run.py index d0f278857e..f0cf07f38f 100755 --- a/tests/mutex_order/tests/01-run.py +++ b/tests/mutex_order/tests/01-run.py @@ -8,6 +8,8 @@ # directory for more details. import sys +from testrunner import run + thread_prio = { 3: 6, @@ -30,5 +32,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/mutex_unlock_and_sleep/tests/01-run.py b/tests/mutex_unlock_and_sleep/tests/01-run.py index b968bc9c9f..8fb545f5b7 100755 --- a/tests/mutex_unlock_and_sleep/tests/01-run.py +++ b/tests/mutex_unlock_and_sleep/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/netdev_test/tests/01-run.py b/tests/netdev_test/tests/01-run.py index c4d0b2f338..18b1fd4793 100755 --- a/tests/netdev_test/tests/01-run.py +++ b/tests/netdev_test/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -22,5 +23,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/netstats_l2/tests/01-run.py b/tests/netstats_l2/tests/01-run.py index 04962da710..200f7de547 100755 --- a/tests/netstats_l2/tests/01-run.py +++ b/tests/netstats_l2/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -19,5 +20,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/nhdp/tests/01-run.py b/tests/nhdp/tests/01-run.py index 968f07cdbb..fa7691f03a 100755 --- a/tests/nhdp/tests/01-run.py +++ b/tests/nhdp/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -14,5 +15,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/od/tests/01-run.py b/tests/od/tests/01-run.py index 31cf2ae1de..0a9969845e 100755 --- a/tests/od/tests/01-run.py +++ b/tests/od/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -39,5 +40,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=1)) diff --git a/tests/od/tests/02-run.py b/tests/od/tests/02-run.py index e998fa6c2c..a9de23120b 100755 --- a/tests/od/tests/02-run.py +++ b/tests/od/tests/02-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -39,5 +40,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=1)) diff --git a/tests/periph_gpio/tests/02-bench.py b/tests/periph_gpio/tests/02-bench.py index 016fc529fe..954089ea06 100755 --- a/tests/periph_gpio/tests/02-bench.py +++ b/tests/periph_gpio/tests/02-bench.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -32,5 +33,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=10)) diff --git a/tests/periph_timer/tests/01-run.py b/tests/periph_timer/tests/01-run.py index dc11d2bb21..4977c8bb24 100755 --- a/tests/periph_timer/tests/01-run.py +++ b/tests/periph_timer/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -21,5 +22,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pipe/tests/01-run.py b/tests/pipe/tests/01-run.py index 3bec382418..e22a8d4be1 100755 --- a/tests/pipe/tests/01-run.py +++ b/tests/pipe/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -29,5 +30,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_cayenne-lpp/tests/01-run.py b/tests/pkg_cayenne-lpp/tests/01-run.py index 593b9e625b..20f57eeef4 100755 --- a/tests/pkg_cayenne-lpp/tests/01-run.py +++ b/tests/pkg_cayenne-lpp/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run NB_TESTS = 3 @@ -12,5 +13,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_fatfs_vfs/tests/01-run.py b/tests/pkg_fatfs_vfs/tests/01-run.py index 7cfe0457f8..091d5730ef 100755 --- a/tests/pkg_fatfs_vfs/tests/01-run.py +++ b/tests/pkg_fatfs_vfs/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run class TestFailed(Exception): @@ -30,5 +31,4 @@ def testfunc(child): if __name__ == "__main__": - import testrunner - sys.exit(testrunner.run(testfunc)) + sys.exit(run(testfunc)) diff --git a/tests/pkg_jsmn/tests/01-run.py b/tests/pkg_jsmn/tests/01-run.py index 950b33af29..534917d81c 100755 --- a/tests/pkg_jsmn/tests/01-run.py +++ b/tests/pkg_jsmn/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_libcoap/tests/01-run.py b/tests/pkg_libcoap/tests/01-run.py index a61abfffae..8aaa897e94 100755 --- a/tests/pkg_libcoap/tests/01-run.py +++ b/tests/pkg_libcoap/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -8,5 +9,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py b/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py index 26ff33cb14..86abe6d980 100755 --- a/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py +++ b/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -12,5 +13,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=60)) diff --git a/tests/pkg_micro-ecc/tests/01-run.py b/tests/pkg_micro-ecc/tests/01-run.py index e4d6ef2c0b..5eddfb3dcc 100755 --- a/tests/pkg_micro-ecc/tests/01-run.py +++ b/tests/pkg_micro-ecc/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -12,5 +13,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=60)) diff --git a/tests/pkg_minmea/tests/01-run.py b/tests/pkg_minmea/tests/01-run.py index 1600bbf7bd..abf3ed6931 100755 --- a/tests/pkg_minmea/tests/01-run.py +++ b/tests/pkg_minmea/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -9,5 +10,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_monocypher/tests/01-run.py b/tests/pkg_monocypher/tests/01-run.py index b750a448e4..ecc2753690 100755 --- a/tests/pkg_monocypher/tests/01-run.py +++ b/tests/pkg_monocypher/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_tiny-asn1/tests/01-run.py b/tests/pkg_tiny-asn1/tests/01-run.py index b582e3a664..47f2a04fbb 100755 --- a/tests/pkg_tiny-asn1/tests/01-run.py +++ b/tests/pkg_tiny-asn1/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_tinycbor/tests/01-run.py b/tests/pkg_tinycbor/tests/01-run.py index 525d41b06c..b4cf24f637 100755 --- a/tests/pkg_tinycbor/tests/01-run.py +++ b/tests/pkg_tinycbor/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_tinycrypt/tests/01-run.py b/tests/pkg_tinycrypt/tests/01-run.py index 479d3d58ce..a279eb9495 100755 --- a/tests/pkg_tinycrypt/tests/01-run.py +++ b/tests/pkg_tinycrypt/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -14,5 +15,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_u8g2/tests/01-run.py b/tests/pkg_u8g2/tests/01-run.py index a9f4333a41..0362c00784 100755 --- a/tests/pkg_u8g2/tests/01-run.py +++ b/tests/pkg_u8g2/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run EXPECTED_STDOUT = ( '00| |', @@ -124,5 +125,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_ucglib/tests/01-run.py b/tests/pkg_ucglib/tests/01-run.py index 92bf679764..7a4527faab 100755 --- a/tests/pkg_ucglib/tests/01-run.py +++ b/tests/pkg_ucglib/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run EXPECTED_STDOUT = ( 'ucg: UCG_MSG_DRAW_PIXEL (128)', @@ -60,5 +61,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pkg_umorse/tests/01-run.py b/tests/pkg_umorse/tests/01-run.py index cb8267ea59..eb346bb085 100755 --- a/tests/pkg_umorse/tests/01-run.py +++ b/tests/pkg_umorse/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -20,5 +21,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/posix_semaphore/tests/01-run.py b/tests/posix_semaphore/tests/01-run.py index f702f67d13..b9aa9d76d1 100755 --- a/tests/posix_semaphore/tests/01-run.py +++ b/tests/posix_semaphore/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def test1(term): @@ -97,5 +98,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/posix_time/tests/01-run.py b/tests/posix_time/tests/01-run.py index 86095f3d20..2f4dab0d66 100755 --- a/tests/posix_time/tests/01-run.py +++ b/tests/posix_time/tests/01-run.py @@ -10,6 +10,7 @@ import sys import time +from testrunner import run US_PER_SEC = 1000000 EXTERNAL_JITTER = 0.15 @@ -45,5 +46,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/ps_schedstatistics/tests/01-run.py b/tests/ps_schedstatistics/tests/01-run.py index 3292007beb..e34a2fe2f7 100755 --- a/tests/ps_schedstatistics/tests/01-run.py +++ b/tests/ps_schedstatistics/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run PS_EXPECTED = ( ('\tpid | name | state Q | pri | stack ( used) | ' @@ -61,5 +62,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread/tests/01-run.py b/tests/pthread/tests/01-run.py index 0b7896edf5..bcb676bafd 100755 --- a/tests/pthread/tests/01-run.py +++ b/tests/pthread/tests/01-run.py @@ -2,6 +2,7 @@ import sys import math +from testrunner import run FACTORIAL_PARAM = 6 @@ -17,5 +18,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread_barrier/tests/01-run.py b/tests/pthread_barrier/tests/01-run.py index 7a7f4a9d28..c5972d9afe 100755 --- a/tests/pthread_barrier/tests/01-run.py +++ b/tests/pthread_barrier/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread_cleanup/tests/01-run.py b/tests/pthread_cleanup/tests/01-run.py index e8ccbd32f7..3ba0f70ea9 100755 --- a/tests/pthread_cleanup/tests/01-run.py +++ b/tests/pthread_cleanup/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -19,5 +20,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread_condition_variable/tests/01-run.py b/tests/pthread_condition_variable/tests/01-run.py index 1b290d33f4..a6edbf2f72 100755 --- a/tests/pthread_condition_variable/tests/01-run.py +++ b/tests/pthread_condition_variable/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -12,5 +13,4 @@ def testfunc(child): if __name__ == "__main__": # This test can take some time to complete when testing on hardware (e.g # on samr21-xpro) and the default timeout (10s) is not enough. - from testrunner import run sys.exit(run(testfunc, timeout=60)) diff --git a/tests/pthread_cooperation/tests/01-run.py b/tests/pthread_cooperation/tests/01-run.py index 6d28862051..51ac02fc3d 100755 --- a/tests/pthread_cooperation/tests/01-run.py +++ b/tests/pthread_cooperation/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -16,5 +17,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread_rwlock/tests/01-run.py b/tests/pthread_rwlock/tests/01-run.py index f49fed0b95..1bb9cdea4c 100755 --- a/tests/pthread_rwlock/tests/01-run.py +++ b/tests/pthread_rwlock/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/pthread_tls/tests/01-run.py b/tests/pthread_tls/tests/01-run.py index ce97c472fe..fc49dd780e 100755 --- a/tests/pthread_tls/tests/01-run.py +++ b/tests/pthread_tls/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def _check_test_output(child): @@ -35,5 +36,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/rmutex/tests/01-run.py b/tests/rmutex/tests/01-run.py index db8e72307f..e481a2086e 100755 --- a/tests/rmutex/tests/01-run.py +++ b/tests/rmutex/tests/01-run.py @@ -9,6 +9,8 @@ # Author: Martin Elshuber import sys +from testrunner import run + thread_prio = { 3: 6, @@ -44,5 +46,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/rng/tests/01-run.py b/tests/rng/tests/01-run.py index 3be36d8212..e6313058c8 100755 --- a/tests/rng/tests/01-run.py +++ b/tests/rng/tests/01-run.py @@ -8,6 +8,7 @@ import sys import re +from testrunner import run def testfunc(child): @@ -65,5 +66,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/sched_testing/tests/01-run.py b/tests/sched_testing/tests/01-run.py index e5ea3eefde..8a82fc6efb 100755 --- a/tests/sched_testing/tests/01-run.py +++ b/tests/sched_testing/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/shell/tests/01-run.py b/tests/shell/tests/01-run.py index 8dc399a49c..25237e5b74 100755 --- a/tests/shell/tests/01-run.py +++ b/tests/shell/tests/01-run.py @@ -7,6 +7,8 @@ # directory for more details. import sys +from testrunner import run + EXPECTED_HELP = ( 'Command Description', @@ -55,5 +57,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/sizeof_tcb/tests/01-run.py b/tests/sizeof_tcb/tests/01-run.py index 3156496921..d36f4af0d4 100755 --- a/tests/sizeof_tcb/tests/01-run.py +++ b/tests/sizeof_tcb/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -38,5 +39,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/socket_zep/tests/01-run.py b/tests/socket_zep/tests/01-run.py index deaa1148e8..843f3421b7 100755 --- a/tests/socket_zep/tests/01-run.py +++ b/tests/socket_zep/tests/01-run.py @@ -8,8 +8,9 @@ import os import sys - import socket +from testrunner import run + IEEE802154_FRAME_LEN_MAX = 127 ZEP_DATA_HEADER_SIZE = 32 @@ -53,14 +54,12 @@ def testfunc(child): if __name__ == "__main__": - import testrunner - os.environ['TERMFLAGS'] = "-z [%s]:%d,[%s]:%d" % ( zep_params['local_addr'], zep_params['local_port'], zep_params['remote_addr'], zep_params['remote_port']) s = socket.socket(family=socket.AF_INET6, type=socket.SOCK_DGRAM) s.bind(("::", zep_params['remote_port'])) - res = testrunner.run(testfunc, timeout=1, echo=True, traceback=True) + res = run(testfunc, timeout=1, echo=True, traceback=True) s.close() if (res == 0): print("Run tests successful") diff --git a/tests/ssp/tests/01-run.py b/tests/ssp/tests/01-run.py index 2def877d0e..36f69e7a9c 100755 --- a/tests/ssp/tests/01-run.py +++ b/tests/ssp/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/struct_tm_utility/tests/01-run.py b/tests/struct_tm_utility/tests/01-run.py index b9fb8939b1..9abe3ea53a 100755 --- a/tests/struct_tm_utility/tests/01-run.py +++ b/tests/struct_tm_utility/tests/01-run.py @@ -9,6 +9,7 @@ import sys import calendar import datetime +from testrunner import run def _check_help(child): @@ -119,5 +120,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_basic/tests/01-run.py b/tests/thread_basic/tests/01-run.py index 32bb41585d..09a61eac0a 100755 --- a/tests/thread_basic/tests/01-run.py +++ b/tests/thread_basic/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_cooperation/tests/01-run.py b/tests/thread_cooperation/tests/01-run.py index 24cabc46ab..a8fd87dd75 100755 --- a/tests/thread_cooperation/tests/01-run.py +++ b/tests/thread_cooperation/tests/01-run.py @@ -8,6 +8,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -17,5 +18,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_exit/tests/01-run.py b/tests/thread_exit/tests/01-run.py index 6a7f96c9f8..e530dc5c10 100755 --- a/tests/thread_exit/tests/01-run.py +++ b/tests/thread_exit/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_flags/tests/01-run.py b/tests/thread_flags/tests/01-run.py index e6551692ea..063a7dd55d 100755 --- a/tests/thread_flags/tests/01-run.py +++ b/tests/thread_flags/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -27,5 +28,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_flags_xtimer/tests/01-run.py b/tests/thread_flags_xtimer/tests/01-run.py index 27d7e19e20..c2d0a775f3 100755 --- a/tests/thread_flags_xtimer/tests/01-run.py +++ b/tests/thread_flags_xtimer/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -11,5 +12,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_flood/tests/01-run.py b/tests/thread_flood/tests/01-run.py index 47615f813e..0e4560c5b9 100755 --- a/tests/thread_flood/tests/01-run.py +++ b/tests/thread_flood/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -10,5 +11,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_msg/tests/01-run.py b/tests/thread_msg/tests/01-run.py index 5a4ba9c34f..99216c42fb 100755 --- a/tests/thread_msg/tests/01-run.py +++ b/tests/thread_msg/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -13,5 +14,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_msg_block_w_queue/tests/01-run.py b/tests/thread_msg_block_w_queue/tests/01-run.py index 4b1633215d..173f819ea3 100755 --- a/tests/thread_msg_block_w_queue/tests/01-run.py +++ b/tests/thread_msg_block_w_queue/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_msg_block_wo_queue/tests/01-run.py b/tests/thread_msg_block_wo_queue/tests/01-run.py index 4b1633215d..173f819ea3 100755 --- a/tests/thread_msg_block_wo_queue/tests/01-run.py +++ b/tests/thread_msg_block_wo_queue/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -15,5 +16,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_msg_seq/tests/01-run.py b/tests/thread_msg_seq/tests/01-run.py index a7e6bf016e..d8854c5738 100755 --- a/tests/thread_msg_seq/tests/01-run.py +++ b/tests/thread_msg_seq/tests/01-run.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +from testrunner import run def testfunc(child): @@ -19,5 +20,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/thread_race/tests/01-run.py b/tests/thread_race/tests/01-run.py index 4578367e59..3757dcd251 100755 --- a/tests/thread_race/tests/01-run.py +++ b/tests/thread_race/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -20,5 +21,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/trace/tests/01-run.py b/tests/trace/tests/01-run.py index 6dc519a47e..41062e51b0 100755 --- a/tests/trace/tests/01-run.py +++ b/tests/trace/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -19,5 +20,4 @@ def testfunc(child): if __name__ == "__main__": - import testrunner - sys.exit(testrunner.run(testfunc, timeout=1, echo=True, traceback=True)) + sys.exit(run(testfunc, timeout=1, echo=True, traceback=True)) diff --git a/tests/trickle/tests/01-run.py b/tests/trickle/tests/01-run.py index 24960cf937..7ada364445 100755 --- a/tests/trickle/tests/01-run.py +++ b/tests/trickle/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -24,5 +25,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/unittests/tests/01-run.py b/tests/unittests/tests/01-run.py index 76920e39d8..5ba9b468a2 100755 --- a/tests/unittests/tests/01-run.py +++ b/tests/unittests/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -14,5 +15,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc, timeout=120)) diff --git a/tests/xtimer_hang/tests/01-run.py b/tests/xtimer_hang/tests/01-run.py index fe24604164..3669d79c1d 100755 --- a/tests/xtimer_hang/tests/01-run.py +++ b/tests/xtimer_hang/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -21,5 +22,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_msg/tests/01-run.py b/tests/xtimer_msg/tests/01-run.py index 3b185d7b32..136b6443a4 100755 --- a/tests/xtimer_msg/tests/01-run.py +++ b/tests/xtimer_msg/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -26,5 +27,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_msg_receive_timeout/tests/01-run.py b/tests/xtimer_msg_receive_timeout/tests/01-run.py index 6d60d859ab..970776f02f 100755 --- a/tests/xtimer_msg_receive_timeout/tests/01-run.py +++ b/tests/xtimer_msg_receive_timeout/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -18,5 +19,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_now64_continuity/tests/01-run.py b/tests/xtimer_now64_continuity/tests/01-run.py index 149f1ae426..d9878d42d6 100755 --- a/tests/xtimer_now64_continuity/tests/01-run.py +++ b/tests/xtimer_now64_continuity/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -16,5 +17,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_periodic_wakeup/tests/01-run.py b/tests/xtimer_periodic_wakeup/tests/01-run.py index 911894d443..019be52c9a 100755 --- a/tests/xtimer_periodic_wakeup/tests/01-run.py +++ b/tests/xtimer_periodic_wakeup/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -22,5 +23,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_remove/tests/01-run.py b/tests/xtimer_remove/tests/01-run.py index 452a8830c9..678f281370 100755 --- a/tests/xtimer_remove/tests/01-run.py +++ b/tests/xtimer_remove/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -24,5 +25,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_reset/tests/01-run.py b/tests/xtimer_reset/tests/01-run.py index 1576d4c54b..285656b17b 100755 --- a/tests/xtimer_reset/tests/01-run.py +++ b/tests/xtimer_reset/tests/01-run.py @@ -7,6 +7,7 @@ # directory for more details. import sys +from testrunner import run def testfunc(child): @@ -20,5 +21,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_usleep/tests/01-run.py b/tests/xtimer_usleep/tests/01-run.py index f2d85f5b94..983bfcc89c 100755 --- a/tests/xtimer_usleep/tests/01-run.py +++ b/tests/xtimer_usleep/tests/01-run.py @@ -11,6 +11,8 @@ import sys import time +from testrunner import run + US_PER_SEC = 1000000 INTERNAL_JITTER = 0.05 @@ -56,5 +58,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc)) diff --git a/tests/xtimer_usleep_short/tests/01-run.py b/tests/xtimer_usleep_short/tests/01-run.py index 8af1779d4e..4d26d21334 100755 --- a/tests/xtimer_usleep_short/tests/01-run.py +++ b/tests/xtimer_usleep_short/tests/01-run.py @@ -8,6 +8,7 @@ import sys import pexpect +from testrunner import run def testfunc(child): @@ -28,5 +29,4 @@ def testfunc(child): if __name__ == "__main__": - from testrunner import run sys.exit(run(testfunc))