diff --git a/dist/tools/testrunner/testrunner.py b/dist/pythonlibs/testrunner/__init__.py similarity index 100% rename from dist/tools/testrunner/testrunner.py rename to dist/pythonlibs/testrunner/__init__.py diff --git a/tests/bench_msg_pingpong/tests/01-run.py b/tests/bench_msg_pingpong/tests/01-run.py index 3a1e733980e94fd7216e5d68884880abafc9eaf1..f2d9f5b121ec3b35855f9f61835cf9402ffeb77c 100755 --- a/tests/bench_msg_pingpong/tests/01-run.py +++ b/tests/bench_msg_pingpong/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3a1e733980e94fd7216e5d68884880abafc9eaf1..f2d9f5b121ec3b35855f9f61835cf9402ffeb77c 100755 --- a/tests/bench_mutex_pingpong/tests/01-run.py +++ b/tests/bench_mutex_pingpong/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3a1e733980e94fd7216e5d68884880abafc9eaf1..f2d9f5b121ec3b35855f9f61835cf9402ffeb77c 100755 --- a/tests/bench_sched_nop/tests/01-run.py +++ b/tests/bench_sched_nop/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3a1e733980e94fd7216e5d68884880abafc9eaf1..f2d9f5b121ec3b35855f9f61835cf9402ffeb77c 100755 --- a/tests/bench_thread_flags_pingpong/tests/01-run.py +++ b/tests/bench_thread_flags_pingpong/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3a1e733980e94fd7216e5d68884880abafc9eaf1..f2d9f5b121ec3b35855f9f61835cf9402ffeb77c 100755 --- a/tests/bench_thread_yield_pingpong/tests/01-run.py +++ b/tests/bench_thread_yield_pingpong/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 7e822de870ef629fa1de37da5fff2b9f0c6ebbae..127cf3e05346109ae134432aa504f1da469467c8 100755 --- a/tests/bitarithm_timings/tests/01-run.py +++ b/tests/bitarithm_timings/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -19,6 +19,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 9cbe884e52bc3d30d95b0ee1e5e23b3fa392c99b..4e78f0722e5074891bc097df02437a7115aae01a 100755 --- a/tests/bloom_bytes/tests/01-run.py +++ b/tests/bloom_bytes/tests/01-run.py @@ -6,9 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys - +from testrunner import run # Biggest step takes 135 seconds on wn430 TIMEOUT = 150 @@ -26,6 +25,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 7f1b54eb3ef8fe6e5d7d64b8b0c8b2fd2213f775..e0e2448140df9ae3fceafe13b513e2cdc803c18f 100755 --- a/tests/buttons/tests/01-run.py +++ b/tests/buttons/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -22,6 +22,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 969728f79a1ab54473b5e674dc525c14cb2acb45..646f7890e0a9412da6fe885686aaba5437ecb5d1 100755 --- a/tests/cb_mux/tests/01-run.py +++ b/tests/cb_mux/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -39,6 +39,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 1f8ac8bcd31e9002417221a67bc082b8ca0606d1..5ad729bdd3af97fe6a628a16532b9a46908cd99c 100755 --- a/tests/cb_mux_bench/tests/01-run.py +++ b/tests/cb_mux_bench/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -20,6 +20,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 54705ff5279d2dd4584ee3020be871dd71c82faf..d5982793e2fd4ebd46123610ea35f70ae6b36c53 100755 --- a/tests/cbor/tests/01-run.py +++ b/tests/cbor/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run ACCEPTED_ERROR = 20 @@ -50,6 +50,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 820ecb20f06fa6930fb5062852e93e5670ba4f15..f0d3989a2d03c66e6b539c7ca1b7a188bc304489 100755 --- a/tests/cpp11_condition_variable/tests/01-run.py +++ b/tests/cpp11_condition_variable/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -26,6 +26,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 124d65c0d4142e5176c9279eeef1a0b30dc8bde8..1e741de37e75a1300873e5bce7a65b43a0280ff3 100755 --- a/tests/cpp11_mutex/tests/01-run.py +++ b/tests/cpp11_mutex/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -22,6 +22,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 dd06462119df41d6b3d2a10ed64dff28a13c6fa4..91303e39d9860ce989e81006e580dc0b938e228f 100755 --- a/tests/cpp11_thread/tests/01-run.py +++ b/tests/cpp11_thread/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -34,6 +34,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 7c5c67005aa051e25b405d2dc598297d027b1474..87ecdb87ccd5169d09445698794431353279b880 100755 --- a/tests/driver_ds1307/tests/01-run.py +++ b/tests/driver_ds1307/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 c18f59861fdcc3aa4906871ebb09c844513d673d..1c1a36b0cac85931b738b470d92bf3435b31f27b 100755 --- a/tests/driver_grove_ledbar/tests/01-run.py +++ b/tests/driver_grove_ledbar/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 f1bd3a1e1c3be3b60a9ccd3f33edc9a39981e81f..8f6a837f3eb71ad5339c5133cc6c5e672a800888 100755 --- a/tests/driver_hd44780/tests/01-run.py +++ b/tests/driver_hd44780/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -17,6 +17,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 167e23dcfd71e6efa0802ba1747d6ebb34965cc2..e6ef129daeee3e3716c8d77870195d40d5a8c7c7 100755 --- a/tests/driver_my9221/tests/01-run.py +++ b/tests/driver_my9221/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e57631bb793136873d0b9d588b1330f1b533d921..a8c5d9b2114a43ca47cad9a8308d4ea6a70fa1ca 100755 --- a/tests/events/tests/01-run.py +++ b/tests/events/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e8523ea80b6345c7dc9445bdd434fea046e93094..cc89181dba8cffe9d18e6db9d496f41ccf129427 100755 --- a/tests/evtimer_msg/tests/01-run.py +++ b/tests/evtimer_msg/tests/01-run.py @@ -7,8 +7,8 @@ # directory for more details. from __future__ import print_function -import os import sys +from testrunner import run ACCEPTED_ERROR = 20 @@ -30,6 +30,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3cfca1775c678e63802b85c958f9fccae9ba0074..a20360e230bf2207083c26b1cae6ae2df0271e3f 100755 --- a/tests/evtimer_underflow/tests/01-run.py +++ b/tests/evtimer_underflow/tests/01-run.py @@ -7,8 +7,8 @@ # directory for more details. from __future__ import print_function -import os import sys +from testrunner import run how_many = 100 @@ -24,6 +24,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e1a7498b5eea5f7ccb0e851609ab744107458bad..f66775af55d2f5654847a239faeca82c53f2dcaa 100755 --- a/tests/float/tests/01-run.py +++ b/tests/float/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run # It takes 35 seconds on wsn430, so add some margin TIMEOUT = 45 @@ -19,6 +19,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 987cbb27e61d793d2c49639ca4047ae57c45d1f7..9f6f3d734810a806bd1f29f3e5dc37b33005f9a4 100755 --- a/tests/fmt_print/tests/01-run.py +++ b/tests/fmt_print/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -10,6 +10,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 126f844d97bb163e851bcb30115edfe097650a3d..f27fe3c5b0e4d5ca53eb9f75d2e7ddcf52e4b1c4 100755 --- a/tests/gnrc_ipv6_ext/tests/01-run.py +++ b/tests/gnrc_ipv6_ext/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -39,6 +39,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 70f5492ef1a3bcc53b5cb23f8f9f03ea7eb62e02..6d8b056e2d59ebf5edaca79a9c57085fab0430ba 100755 --- a/tests/gnrc_ipv6_nib/tests/01-run.py +++ b/tests/gnrc_ipv6_nib/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 70f5492ef1a3bcc53b5cb23f8f9f03ea7eb62e02..6d8b056e2d59ebf5edaca79a9c57085fab0430ba 100755 --- a/tests/gnrc_ipv6_nib_6ln/tests/01-run.py +++ b/tests/gnrc_ipv6_nib_6ln/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 69bb9c30bc12098488e85f7c5263cbeefaef3add..022ebe7a894a2ca859e903bd13b48adcaac13b77 100755 --- a/tests/gnrc_ndp/tests/01-run.py +++ b/tests/gnrc_ndp/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -17,6 +17,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8026b7c1c0c6f2512f3931da75c016f42e87a578..36ce840217e26179d0e68608eadbac416d5c0238 100755 --- a/tests/gnrc_netif/tests/01-run.py +++ b/tests/gnrc_netif/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -138,6 +138,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3ffe189ca0021a83bb257b212a29448a46bc85b6..c668cb82546859b8f5f76e936914a93e4ffb2f9d 100755 --- a/tests/gnrc_sixlowpan/tests/01-run.py +++ b/tests/gnrc_sixlowpan/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -76,6 +76,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 f63b0ac9e1281692fe6329df6d1d8ad1f3b62a55..9d661f3f38a65363f18add1c5424e9a412e09bb2 100755 --- a/tests/gnrc_sock_ip/tests/01-run.py +++ b/tests/gnrc_sock_ip/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -49,6 +49,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 fc2af8ab9c914e786a36e9fe0b071cd6b1d7b624..d4592652e4b7f2869c950028571c610cdf207261 100755 --- a/tests/gnrc_sock_udp/tests/01-run.py +++ b/tests/gnrc_sock_udp/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -53,6 +53,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 0d0452340676414d9746808f93ba3f156355665e..bcc3f49769a73b65e445111bdeca629375a57167 100755 --- a/tests/irq/tests/01-run.py +++ b/tests/irq/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -10,6 +10,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 a3b7dfdaa66f0f09ae82b7a3bae55398825e6e64..14cec5778a80e3c910d292cc0b87501aadbd0255 100755 --- a/tests/isr_yield_higher/tests/test.py +++ b/tests/isr_yield_higher/tests/test.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -18,6 +18,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 eeaa7d2c1f391be53c9e1484bd1dd96ff3448615..5aedfe886923d2c2207f93fa699b3ea828a76d68 100755 --- a/tests/libc_newlib/tests/01-run.py +++ b/tests/libc_newlib/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -15,6 +15,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 319957db80589fe1c9716ef36388b7eb1662c7ec..29213751f7e26f3f3e979eefc2f69909749102ea 100755 --- a/tests/libfixmath/tests/01-run.py +++ b/tests/libfixmath/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def expect_unary(child): @@ -39,6 +39,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 d5c4c49b219789853053b87acc7d031d39d2f659..5ee57f9dfb28808013674e8ce14450c922e99e35 100755 --- a/tests/libfixmath_unittests/tests/01-run.py +++ b/tests/libfixmath_unittests/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run # Float and print operations are slow on boards # Got 80 iotlab-m3 and 250 on samr21-xpro @@ -19,6 +19,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 9468d74aa4b447d325330b008acf913ca9c2be01..f33598cecebd0f73fb2a0f455db556a52497340c 100755 --- a/tests/lwip_sock_ip/tests/01-run.py +++ b/tests/lwip_sock_ip/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def _ipv6_tests(code): @@ -97,6 +97,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 c28874f56e317cb1ab1a1af91e0302ddcf3328d4..c9da01e20598ec56c64e5e764400c97e64a3c363 100755 --- a/tests/lwip_sock_tcp/tests/01-run.py +++ b/tests/lwip_sock_tcp/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def _reuse_tests(code): @@ -91,6 +91,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 c9cb4da1f02bf0f2592f141d34fe86756258bd89..5fba61af8b370bf3a919926771b611f587c90f23 100755 --- a/tests/lwip_sock_udp/tests/01-run.py +++ b/tests/lwip_sock_udp/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def _reuse_tests(code): @@ -109,6 +109,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e57631bb793136873d0b9d588b1330f1b533d921..a8c5d9b2114a43ca47cad9a8308d4ea6a70fa1ca 100755 --- a/tests/msg_avail/tests/01-run.py +++ b/tests/msg_avail/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 ae35405b6fe8457c3bf1819cb3c39de57c5b3958..5dcb3a9dcfcb2a97692718c150347fc2b9c28966 100755 --- a/tests/msg_send_receive/tests/01-run.py +++ b/tests/msg_send_receive/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -15,6 +15,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 d22d0725a55e46337e356acd062b94a13b4ec166..887db6ff7944872a03b702355c92f25d6af6ddba 100755 --- a/tests/msg_try_receive/tests/01-run.py +++ b/tests/msg_try_receive/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -10,6 +10,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 dfcb36346aade3dc178939dca040084d81eaab15..f0cf07f38f9210652c174abf0104fb256cae4ede 100755 --- a/tests/mutex_order/tests/01-run.py +++ b/tests/mutex_order/tests/01-run.py @@ -7,8 +7,9 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run + thread_prio = { 3: 6, @@ -31,6 +32,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 955095373a935eed7c59caa674b20f12c5732a0c..8fb545f5b77f58276c839b4ebde21522eb04dc64 100755 --- a/tests/mutex_unlock_and_sleep/tests/01-run.py +++ b/tests/mutex_unlock_and_sleep/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 a1f1a1f76557782275b9c5277cc3f35a183736a8..18b1fd47934f26d2fa5e1dd8618bceed567438fd 100755 --- a/tests/netdev_test/tests/01-run.py +++ b/tests/netdev_test/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -23,6 +23,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 5171e572e87c3292b7aff1b4c60cbc7cc05b7cc8..200f7de547586bdf397298aba2a16ffc4f7e3e3a 100755 --- a/tests/netstats_l2/tests/01-run.py +++ b/tests/netstats_l2/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -20,6 +20,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 81f36414519f9b09096462851e294fd460daac82..fa7691f03a6ff7b09fee856cee0322a4c71ae162 100755 --- a/tests/nhdp/tests/01-run.py +++ b/tests/nhdp/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -15,6 +15,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 9b3e1674c97a18980a1b30ce60f057d08a21969c..0a9969845e1953f9d5bd16a56474e207b8580aa4 100755 --- a/tests/od/tests/01-run.py +++ b/tests/od/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -40,6 +40,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e88f23762d5667a425bd217055a357c83f4f46c5..a9de23120b1f70e9fb79e0ee6eae47eca55547c5 100755 --- a/tests/od/tests/02-run.py +++ b/tests/od/tests/02-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -40,6 +40,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 a07ac31da8a8799fd46d17d6fc7b4ce71ca6d62a..954089ea066a250d6278ba744e41042f3751bda2 100755 --- a/tests/periph_gpio/tests/02-bench.py +++ b/tests/periph_gpio/tests/02-bench.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -33,6 +33,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8f39997aecf3e249b535d6fe939417474ab8420f..4977c8bb2410f858d4c5b4925b34b2e4e79e96fb 100755 --- a/tests/periph_timer/tests/01-run.py +++ b/tests/periph_timer/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -22,6 +22,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8417733703a348a0e2883ec5cca0fbb03a797464..e22a8d4be12439578f4df870eacc27e8e542fc46 100755 --- a/tests/pipe/tests/01-run.py +++ b/tests/pipe/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -30,6 +30,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 0ba9d6f14371c7da99a06228cbb40ee34171f1f8..20f57eeef47a2b5e26852855adcaf4e4b5a590d8 100755 --- a/tests/pkg_cayenne-lpp/tests/01-run.py +++ b/tests/pkg_cayenne-lpp/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run NB_TESTS = 3 @@ -13,6 +13,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e24f2ce3d3f9c51c9a24bd868fc03184c3d71fad..091d5730efccd34f126b6edfd4b48d2f8084633c 100755 --- a/tests/pkg_fatfs_vfs/tests/01-run.py +++ b/tests/pkg_fatfs_vfs/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run class TestFailed(Exception): @@ -31,6 +31,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 786b43f4ea74e9e6b5a2ab30baddd310ed853d6e..534917d81cff269fb7f15ecfd2d8f37855403e5e 100755 --- a/tests/pkg_jsmn/tests/01-run.py +++ b/tests/pkg_jsmn/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 0978437c60667f0a359b534f06eedecb48a0d9c1..8aaa897e940a319c17031c6c95e3c23deb027af9 100755 --- a/tests/pkg_libcoap/tests/01-run.py +++ b/tests/pkg_libcoap/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -9,6 +9,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 825e260a543d917ed97f6c04e30b18d1d8c7badf..86abe6d98016d2c1d5f40d50e7ae53a57476017a 100755 --- a/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py +++ b/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -13,6 +13,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 997b3b8e8e7687e57c377d9e360cee02e6521029..5eddfb3dcc80df23eef17e7be13db0d9a1a4746d 100755 --- a/tests/pkg_micro-ecc/tests/01-run.py +++ b/tests/pkg_micro-ecc/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -13,6 +13,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 84d36144ef45c29f4f31934ef41f49c10a4cdbbf..abf3ed69311891c06af3c04991eae13688f01d2c 100755 --- a/tests/pkg_minmea/tests/01-run.py +++ b/tests/pkg_minmea/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -10,6 +10,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 d90541ef3962b473db195c66706d968a238164d9..ecc27536909a81e9afd88af0842fa7af39ada8d4 100755 --- a/tests/pkg_monocypher/tests/01-run.py +++ b/tests/pkg_monocypher/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,7 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTBASE'], - 'dist/tools/testrunner')) - 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 c52f61ed0d72cb95181dc2848ecb626f00096a12..47f2a04fbb7b731fd38b6acf365b561a22351989 100755 --- a/tests/pkg_tiny-asn1/tests/01-run.py +++ b/tests/pkg_tiny-asn1/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 05dcbec1d2d368f8f989d42cec52245e48eddfe1..b4cf24f637d83d268f6a2dea84b9f3ec2f8d9db8 100755 --- a/tests/pkg_tinycbor/tests/01-run.py +++ b/tests/pkg_tinycbor/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 7534d42721ffcf23ca0bf93860e12ffb62dee287..a279eb94954ba56ce8e89bf775672510d99cb7dc 100755 --- a/tests/pkg_tinycrypt/tests/01-run.py +++ b/tests/pkg_tinycrypt/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -15,6 +15,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 0db138076c5ff901fe576b9452676f880a515a2f..0362c00784ed6969d9001479968ecfc483be0b94 100755 --- a/tests/pkg_u8g2/tests/01-run.py +++ b/tests/pkg_u8g2/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run EXPECTED_STDOUT = ( '00| |', @@ -125,6 +125,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 746ef8b5f8b6ec56d487a53e8c3a1eb5b3cde7bb..7a4527faab81e9b7650c4f12801006b0f4467b2d 100755 --- a/tests/pkg_ucglib/tests/01-run.py +++ b/tests/pkg_ucglib/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run EXPECTED_STDOUT = ( 'ucg: UCG_MSG_DRAW_PIXEL (128)', @@ -61,6 +61,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 13ef30da4b99bd92d0433f80232efa01c958f2cf..eb346bb085cec4a13089adaba3e2db2450e48c95 100755 --- a/tests/pkg_umorse/tests/01-run.py +++ b/tests/pkg_umorse/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -21,6 +21,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 b3236d29e699113dcd5d826f9ba1507bd2303780..b9aa9d76d105db4b3515990a829304580e185e93 100755 --- a/tests/posix_semaphore/tests/01-run.py +++ b/tests/posix_semaphore/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def test1(term): @@ -98,6 +98,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 875544d18664c024c34cd2ade6a4a24ec20d2614..2f4dab0d661389352f351af08da9e3fc59c2cd2b 100755 --- a/tests/posix_time/tests/01-run.py +++ b/tests/posix_time/tests/01-run.py @@ -8,9 +8,9 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys import time +from testrunner import run US_PER_SEC = 1000000 EXTERNAL_JITTER = 0.15 @@ -46,6 +46,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 b755f6ad84b1e82bd9c5710b80e830f4052dabc1..e34a2fe2f75014931860635aca919de9280dc6a0 100755 --- a/tests/ps_schedstatistics/tests/01-run.py +++ b/tests/ps_schedstatistics/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run PS_EXPECTED = ( ('\tpid | name | state Q | pri | stack ( used) | ' @@ -62,6 +62,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 669b6e49f352e0e3a6f43c6bac544f93a09204ff..bcb676bafd65c3dbd4b653a6a15498ad892a0696 100755 --- a/tests/pthread/tests/01-run.py +++ b/tests/pthread/tests/01-run.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -import os import sys import math +from testrunner import run FACTORIAL_PARAM = 6 @@ -18,6 +18,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 322180207c3d3b4f89765560345027d0c5dd3b58..c5972d9afe32fa2c7010c00eba7a4fe8cd6b1e6b 100755 --- a/tests/pthread_barrier/tests/01-run.py +++ b/tests/pthread_barrier/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 cbb843781f5752a3a0cfb00a99a809d46f90dbde..3ba0f70ea9055acf8d286d5a5800b1da525cf0df 100755 --- a/tests/pthread_cleanup/tests/01-run.py +++ b/tests/pthread_cleanup/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -20,6 +20,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 1451820944f6a22c4964131955e068975a07f21d..a6edbf2f72d9bbd1f639e053226ef49647bbfa39 100755 --- a/tests/pthread_condition_variable/tests/01-run.py +++ b/tests/pthread_condition_variable/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -13,6 +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. - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 b950186a084accfe1466c1245c0f528a289c0699..51ac02fc3d871044ca50ca6256b9d8bd21d07970 100755 --- a/tests/pthread_cooperation/tests/01-run.py +++ b/tests/pthread_cooperation/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -17,6 +17,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 02a30103642e46c29256d01fd26e115d11bdb5db..1bb9cdea4c7f9c4792a7763365bf0dda0685bd96 100755 --- a/tests/pthread_rwlock/tests/01-run.py +++ b/tests/pthread_rwlock/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 d25f2c5676c44d184e68aef633aba6f269f1b624..fc49dd780e62d055954e9afd458f48893021134e 100755 --- a/tests/pthread_tls/tests/01-run.py +++ b/tests/pthread_tls/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def _check_test_output(child): @@ -36,6 +36,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 f4b89d02958dcd2a8247d6c18d4ec29a4acf2ead..e481a2086e995155f016d6e2f6193fa5dd1dcc41 100755 --- a/tests/rmutex/tests/01-run.py +++ b/tests/rmutex/tests/01-run.py @@ -8,8 +8,9 @@ # Author: Martin Elshuber <martin.elshuber@theobroma-systems.com> -import os import sys +from testrunner import run + thread_prio = { 3: 6, @@ -45,6 +46,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e8573f535e1853af63a521237d47a3d51250b020..e6313058c8962366275ba5070790e996df992405 100755 --- a/tests/rng/tests/01-run.py +++ b/tests/rng/tests/01-run.py @@ -7,8 +7,8 @@ # directory for more details. import sys -import os import re +from testrunner import run def testfunc(child): @@ -66,6 +66,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ["RIOTTOOLS"], "testrunner")) - 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 808de540dbe538af60ac4952410c1a97f90e7c4d..8a82fc6efb19b016c186419fad9440d4eee625a7 100755 --- a/tests/sched_testing/tests/01-run.py +++ b/tests/sched_testing/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 52d187b8fbfb93595cb1cbc15b9f98f0d2a3871d..25237e5b743dbfbb4e7cb2f0b671b52b5194a14a 100755 --- a/tests/shell/tests/01-run.py +++ b/tests/shell/tests/01-run.py @@ -6,8 +6,9 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run + EXPECTED_HELP = ( 'Command Description', @@ -56,6 +57,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 587a51d9775d1ca8491842f1035f8fc4ebed9505..d36f4af0d4f1d31cc4f87032cd8b09a790bd88c3 100755 --- a/tests/sizeof_tcb/tests/01-run.py +++ b/tests/sizeof_tcb/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -39,6 +39,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 f1eb831faa459a0319c7465e585ceff416b8857c..843f3421b74e48adce339f8dc59afaef0ee382a7 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,15 +54,12 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 d1975224a7d4616e9107a46b95ae891564b04915..36f69e7a9c66c6ac9c7a2fe1444a316c6b35ab8f 100755 --- a/tests/ssp/tests/01-run.py +++ b/tests/ssp/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 4c157cb8c90bb5d66d613b18e1d4c1d0276318df..9abe3ea53a31ecb922475f4450fc472b8f1dbc08 100755 --- a/tests/struct_tm_utility/tests/01-run.py +++ b/tests/struct_tm_utility/tests/01-run.py @@ -6,10 +6,10 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys import calendar import datetime +from testrunner import run def _check_help(child): @@ -120,6 +120,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 99ca62c51cf260b4ba1fe3035eec2349ccd8ce93..09a61eac0a9fb0285d6c355c29cd42528bd21614 100755 --- a/tests/thread_basic/tests/01-run.py +++ b/tests/thread_basic/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 1ded975d802545fcee2028f6a51b68414b5c75b4..a8fd87dd75f215c1a482dde74c3a021e766b4932 100755 --- a/tests/thread_cooperation/tests/01-run.py +++ b/tests/thread_cooperation/tests/01-run.py @@ -7,8 +7,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -18,6 +18,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 51a8386d4f04c7ad7700717fc72ce291bbed6b1b..e530dc5c1006e0c1ec5613ff0c6681afb91bd359 100755 --- a/tests/thread_exit/tests/01-run.py +++ b/tests/thread_exit/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 0aa62a45be896d375bca701c08448f70daf9b6cc..063a7dd55d0ee8853a6bb3d713e24d0d415ce098 100755 --- a/tests/thread_flags/tests/01-run.py +++ b/tests/thread_flags/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -28,6 +28,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 b89b97b35090dedb8316ea22e47133351ed33d0a..c2d0a775f32a7e44212435cb4c30f1022d966704 100755 --- a/tests/thread_flags_xtimer/tests/01-run.py +++ b/tests/thread_flags_xtimer/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -12,6 +12,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 00b61693d9b86d6a0f19d6ce73ac6975b8004832..0e4560c5b9ed613d9fb94422f458efccf2d33e19 100755 --- a/tests/thread_flood/tests/01-run.py +++ b/tests/thread_flood/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -11,6 +11,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 219edb242465106c6d90bdb26cb5319fc8b347f9..99216c42fb0f5e741ac7a9b581673b4da9f12ffd 100755 --- a/tests/thread_msg/tests/01-run.py +++ b/tests/thread_msg/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -14,6 +14,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 4e6aeb289d0f9d940a9ac298b2b3bdcb60717704..173f819ea35f8cd09e3633d7df1e3b341cb43914 100755 --- a/tests/thread_msg_block_w_queue/tests/01-run.py +++ b/tests/thread_msg_block_w_queue/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 4e6aeb289d0f9d940a9ac298b2b3bdcb60717704..173f819ea35f8cd09e3633d7df1e3b341cb43914 100755 --- a/tests/thread_msg_block_wo_queue/tests/01-run.py +++ b/tests/thread_msg_block_wo_queue/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -16,6 +16,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e254d99b56a14aa73fb9a4564c1f153d3ec13ba0..d8854c57381a3514a33a9392477c522626810516 100755 --- a/tests/thread_msg_seq/tests/01-run.py +++ b/tests/thread_msg_seq/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import os import sys +from testrunner import run def testfunc(child): @@ -20,6 +20,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 33bc6ecaa07c81a909844a2ef2f46873e9de64be..3757dcd251719e4db1d4dae8ac855b0162704a2f 100755 --- a/tests/thread_race/tests/01-run.py +++ b/tests/thread_race/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -21,6 +21,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8321cafd6e55f10581a76b323b7f96f2e96758ef..41062e51b0d0d6bb0e38521e3c768a9a46cbac5b 100755 --- a/tests/trace/tests/01-run.py +++ b/tests/trace/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -20,6 +20,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 e3625e112a266b6e759f3b568eed7fe312d8b957..7ada3644454ca9c1b668b0c4f42cd79a97b83c3a 100755 --- a/tests/trickle/tests/01-run.py +++ b/tests/trickle/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -25,6 +25,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 9559c2e0765806cd072f820fee99a83f40011c8f..5ba9b468a2886df6382abac0d400ad39729c2d7d 100755 --- a/tests/unittests/tests/01-run.py +++ b/tests/unittests/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -15,6 +15,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8b314e399eda8e9ac153b25a02c9a84ea3f3e026..3669d79c1dd4f7715abb77d237e1a244e0ca6522 100755 --- a/tests/xtimer_hang/tests/01-run.py +++ b/tests/xtimer_hang/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -22,6 +22,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 8fd6388577eb54a8d2aa093fe3591d3cb78b6d39..136b6443a42faf2df711aa3c3f92746cc454442e 100755 --- a/tests/xtimer_msg/tests/01-run.py +++ b/tests/xtimer_msg/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -27,6 +27,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 6c8d8492f7a95ac435e59506a4deb71c26c42a50..970776f02f9fdac9f5f152639b7d3167d98afcd9 100755 --- a/tests/xtimer_msg_receive_timeout/tests/01-run.py +++ b/tests/xtimer_msg_receive_timeout/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -19,6 +19,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 32181ec4358f62e662fed8d0f0a2ae4a0474103c..d9878d42d6e0e5810d5c0b3b03cf5ca074c9386a 100755 --- a/tests/xtimer_now64_continuity/tests/01-run.py +++ b/tests/xtimer_now64_continuity/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -17,6 +17,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 2da5521fdb659580ffcf348ba2df7dcdef932254..019be52c9a7a7b52e8075b6c46956b1c5687c3c9 100755 --- a/tests/xtimer_periodic_wakeup/tests/01-run.py +++ b/tests/xtimer_periodic_wakeup/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -23,6 +23,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 119b4659708074ccd4b19a1eee87d0127be1c8bd..678f2813700a0e8bce9d5cf1168d4bab14502533 100755 --- a/tests/xtimer_remove/tests/01-run.py +++ b/tests/xtimer_remove/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -25,6 +25,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 f957546b08bdea45620ba6c7790d73522c951313..285656b17b9567017f6e1227872114e3bda672fa 100755 --- a/tests/xtimer_reset/tests/01-run.py +++ b/tests/xtimer_reset/tests/01-run.py @@ -6,8 +6,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys +from testrunner import run def testfunc(child): @@ -21,6 +21,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 670f8da852470bda6c4f9e90cf9984676ec81a14..983bfcc89c5c414abc10d1f2bd077928a4258c79 100755 --- a/tests/xtimer_usleep/tests/01-run.py +++ b/tests/xtimer_usleep/tests/01-run.py @@ -9,9 +9,10 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys import time +from testrunner import run + US_PER_SEC = 1000000 INTERNAL_JITTER = 0.05 @@ -57,6 +58,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - 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 3e7790a9226910b9bec11ff9326865ecd789cd4d..4d26d21334161c26924003f8a3a669d6714cde8d 100755 --- a/tests/xtimer_usleep_short/tests/01-run.py +++ b/tests/xtimer_usleep_short/tests/01-run.py @@ -6,9 +6,9 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -import os import sys import pexpect +from testrunner import run def testfunc(child): @@ -29,6 +29,4 @@ def testfunc(child): if __name__ == "__main__": - sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) - from testrunner import run sys.exit(run(testfunc))