diff --git a/tests/bitarithm_timings/tests/01-run.py b/tests/bitarithm_timings/tests/01-run.py index 3178e94cfc29f6aee904e0668f91522b9a1f8c08..07b53e69b271263ef97bfe94c1ab805a7aa32f1f 100755 --- a/tests/bitarithm_timings/tests/01-run.py +++ b/tests/bitarithm_timings/tests/01-run.py @@ -17,6 +17,7 @@ def testfunc(child): child.expect('\+ bitarithm_bits_set: \d+ iterations per second') child.expect_exact("Done.") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/bloom_bytes/tests/01-run.py b/tests/bloom_bytes/tests/01-run.py index de75b398f40008f29370d338f1074f1368e01956..c6ee02d48dbff803cf9681060d42609a4aadbf38 100755 --- a/tests/bloom_bytes/tests/01-run.py +++ b/tests/bloom_bytes/tests/01-run.py @@ -20,6 +20,7 @@ def testfunc(child): child.expect(".+ false positive rate.") child.expect_exact("All done!") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/buttons/tests/01-run.py b/tests/buttons/tests/01-run.py index 59437ecf377f4ae3ea9bee5cc318350a118122c7..9dc3845b010e8f3dd294302133fc6f5a5ac5653c 100755 --- a/tests/buttons/tests/01-run.py +++ b/tests/buttons/tests/01-run.py @@ -20,6 +20,7 @@ def testfunc(child): if index == 1: child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/cbor/tests/01-run.py b/tests/cbor/tests/01-run.py index 68ec27daef2034d9a3ec105365a781192e6b08ac..bb351a533429e8b209baa7bb9fa89924c9df8991 100755 --- a/tests/cbor/tests/01-run.py +++ b/tests/cbor/tests/01-run.py @@ -48,6 +48,7 @@ def testfunc(child): print("All tests successful") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/cpp11_condition_variable/tests/01-run.py b/tests/cpp11_condition_variable/tests/01-run.py index c92f48c64f4ac662d7501866871e29b598155a9d..27414b15f1bcb448d4e37a3ed6c3c8981807c257 100755 --- a/tests/cpp11_condition_variable/tests/01-run.py +++ b/tests/cpp11_condition_variable/tests/01-run.py @@ -24,6 +24,7 @@ def testfunc(child): child.expect_exact("Bye, bye.") child.expect_exact("******************************************************") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/cpp11_mutex/tests/01-run.py b/tests/cpp11_mutex/tests/01-run.py index 76bf11d9d7a23fe46b4fc315e21728b8179c25ee..9ab150730c700cdc71ec84e491a11a1948066d24 100755 --- a/tests/cpp11_mutex/tests/01-run.py +++ b/tests/cpp11_mutex/tests/01-run.py @@ -20,6 +20,7 @@ def testfunc(child): child.expect_exact("Bye, bye.") child.expect_exact("*****************************************") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/cpp11_thread/tests/01-run.py b/tests/cpp11_thread/tests/01-run.py index 98b91d1d4e8711f3f69e8aaccbd8f34b9cfc5311..9a817e4b35926d7907a6453987bc8af178922a30 100755 --- a/tests/cpp11_thread/tests/01-run.py +++ b/tests/cpp11_thread/tests/01-run.py @@ -32,6 +32,7 @@ def testfunc(child): child.expect_exact("Bye, bye.") child.expect_exact("******************************************") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/driver_ds1307/tests/01-run.py b/tests/driver_ds1307/tests/01-run.py index b9d290dc4f4e3b17815edadc9857c9c2a8f4b61f..6ed2af7420f235891c676c5fa439e3ef2261cff7 100755 --- a/tests/driver_ds1307/tests/01-run.py +++ b/tests/driver_ds1307/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect([r"OK \([0-9]+ tests\)", r"error: unable to initialize RTC \[I2C initialization error\]"]) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/driver_grove_ledbar/tests/01-run.py b/tests/driver_grove_ledbar/tests/01-run.py index 5b61fd1c99dc87e3a096ccf1407989d99b6ce5c9..c84b665d705dc064224d787047479498f96cb423 100755 --- a/tests/driver_grove_ledbar/tests/01-run.py +++ b/tests/driver_grove_ledbar/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect_exact(u"[SUCCESS]", timeout=60) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/driver_hd44780/tests/01-run.py b/tests/driver_hd44780/tests/01-run.py index 234d38d8b643cb4d9f0122044933dc657ac931e3..d1c960c92626697cf22ee2a11f220a274949c63d 100644 --- a/tests/driver_hd44780/tests/01-run.py +++ b/tests/driver_hd44780/tests/01-run.py @@ -15,6 +15,7 @@ def testfunc(child): child.expect_exact("[START]") child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/driver_my9221/tests/01-run.py b/tests/driver_my9221/tests/01-run.py index e5ee08c2218f6ad4253f36fd70233359c94b34b2..5294c8fff18f2caf20c4ddc7d92aca5bc9b56e3e 100755 --- a/tests/driver_my9221/tests/01-run.py +++ b/tests/driver_my9221/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect_exact("[SUCCESS]", timeout=60) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/events/tests/01-run.py b/tests/events/tests/01-run.py index fab469c90508150d2d80797833f955aa78621110..2a924bfa85e0e1d8ef0e6966a283ae1a1b6d1cfb 100755 --- a/tests/events/tests/01-run.py +++ b/tests/events/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect_exact(u"[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/evtimer_msg/tests/01-run.py b/tests/evtimer_msg/tests/01-run.py index 6f8c0eee462d6a3d821ed3d6addf907401708ccc..e6b253ca2cc8a829628f82605686d3dd2a488909 100755 --- a/tests/evtimer_msg/tests/01-run.py +++ b/tests/evtimer_msg/tests/01-run.py @@ -28,6 +28,7 @@ def testfunc(child): print("") print("All tests successful") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/evtimer_underflow/tests/01-run.py b/tests/evtimer_underflow/tests/01-run.py index 60efd4d8dadfb08651c1e8dbdb3825828c21ce73..8fc46bcedb98cdf156bb25cc44b227f5c3a7be25 100755 --- a/tests/evtimer_underflow/tests/01-run.py +++ b/tests/evtimer_underflow/tests/01-run.py @@ -22,6 +22,7 @@ def testfunc(child): print("Stopped after %i iterations, but should run forever." % how_many) print("=> All tests successful") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/float/tests/01-run.py b/tests/float/tests/01-run.py index 0bef7e65cb0a2d199ba246002ba09ffdc13a38d9..7147006321192d0a37c6aca4aa9424b012aaee51 100755 --- a/tests/float/tests/01-run.py +++ b/tests/float/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect_exact("Testing floating point arithmetics...") child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/fmt_print/tests/01-run.py b/tests/fmt_print/tests/01-run.py index 913500e1c70fa0c0328251524f0a94e239619905..1376bea5cc0b4150d6c1e3b1e6b235d968142a59 100755 --- a/tests/fmt_print/tests/01-run.py +++ b/tests/fmt_print/tests/01-run.py @@ -8,6 +8,7 @@ def testfunc(child): child.expect_exact('If you can read this:') child.expect_exact('Test successful.') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_ipv6_ext/tests/01-run.py b/tests/gnrc_ipv6_ext/tests/01-run.py index 3a56e803ba864049c52cf05d41219119694b1d60..e6e1dca5009bf75a2c84e4e5c081c1fdbcfa954e 100755 --- a/tests/gnrc_ipv6_ext/tests/01-run.py +++ b/tests/gnrc_ipv6_ext/tests/01-run.py @@ -37,6 +37,7 @@ def testfunc(child): child.expect_exact("ipv6: forward nh = 17 to other threads") child.expect_exact("pkt->users: 0") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_ipv6_nib/tests/01-run.py b/tests/gnrc_ipv6_nib/tests/01-run.py index 741c695754551c271aea362bddc4dd26a4c9e590..5335cd0ffdc3547466160581e2d461807e17619e 100755 --- a/tests/gnrc_ipv6_nib/tests/01-run.py +++ b/tests/gnrc_ipv6_nib/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect(r"OK \(\d+ tests\)") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_ipv6_nib_6ln/tests/01-run.py b/tests/gnrc_ipv6_nib_6ln/tests/01-run.py index 741c695754551c271aea362bddc4dd26a4c9e590..5335cd0ffdc3547466160581e2d461807e17619e 100755 --- a/tests/gnrc_ipv6_nib_6ln/tests/01-run.py +++ b/tests/gnrc_ipv6_nib_6ln/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect(r"OK \(\d+ tests\)") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_ndp/tests/01-run.py b/tests/gnrc_ndp/tests/01-run.py index dcc3c5d7f654cf33372f19547d4eab5ced477d31..abcdd5d7424fedd7ee0010889dc5a91a51b1f063 100755 --- a/tests/gnrc_ndp/tests/01-run.py +++ b/tests/gnrc_ndp/tests/01-run.py @@ -15,6 +15,7 @@ def testfunc(child): # 1st 6LoWPAN fragment child.expect(r"OK \(\d+ tests\)") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_netif/tests/01-run.py b/tests/gnrc_netif/tests/01-run.py index 7901d4b7c0a231dbcb92f14d5d195c02dc650547..007806d14957bf2da2ea7df168297e980ef78d22 100755 --- a/tests/gnrc_netif/tests/01-run.py +++ b/tests/gnrc_netif/tests/01-run.py @@ -136,6 +136,7 @@ def testfunc(child): child.expect("dst_l2addr: 3e:e6:b5:22:fd:0a") child.expect("~~ PKT - 2 snips, total size: 61 byte") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_sixlowpan/tests/01-run.py b/tests/gnrc_sixlowpan/tests/01-run.py index 5138e344083cfb8ba883a03dcb72acafb98b9f64..0d383b5d8c804fcfe3bb453212c93303480f389f 100755 --- a/tests/gnrc_sixlowpan/tests/01-run.py +++ b/tests/gnrc_sixlowpan/tests/01-run.py @@ -74,6 +74,7 @@ def testfunc(child): child.expect_exact("source address: fe80::ff:fe00:2") child.expect_exact("destination address: fd01::1") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_sock_ip/tests/01-run.py b/tests/gnrc_sock_ip/tests/01-run.py index dfe4e3077f903878f0a1917170267efedf3fa7d8..1a1b9564c5353c65eaf6b4d968897ad9f0ccfbaf 100755 --- a/tests/gnrc_sock_ip/tests/01-run.py +++ b/tests/gnrc_sock_ip/tests/01-run.py @@ -47,6 +47,7 @@ def testfunc(child): child.expect_exact(u"Calling test_sock_ip_send__no_sock()") child.expect_exact(u"ALL TESTS SUCCESSFUL") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/gnrc_sock_udp/tests/01-run.py b/tests/gnrc_sock_udp/tests/01-run.py index a91d62103f6f462fc98fbba922a6964ecac290a1..3805eddb51ce881e00d36bd5efa25ad4588b70de 100755 --- a/tests/gnrc_sock_udp/tests/01-run.py +++ b/tests/gnrc_sock_udp/tests/01-run.py @@ -51,6 +51,7 @@ def testfunc(child): child.expect_exact(u"Calling test_sock_udp_send__no_sock()") child.expect_exact(u"ALL TESTS SUCCESSFUL") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/irq/tests/01-run.py b/tests/irq/tests/01-run.py index f5394a40b7b3a49a4779eb11d5c35fa269564ff1..e0882108c82d9d20ff669bc9e86c965dced8ba7c 100755 --- a/tests/irq/tests/01-run.py +++ b/tests/irq/tests/01-run.py @@ -8,6 +8,7 @@ def testfunc(child): child.expect('START') child.expect('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/libfixmath/tests/01-run.py b/tests/libfixmath/tests/01-run.py index 71916e93eaa52feb0373413a28210c73b7034ae6..806cbe31f7babb21a856fa730bdc46cd0e4402ea 100755 --- a/tests/libfixmath/tests/01-run.py +++ b/tests/libfixmath/tests/01-run.py @@ -37,6 +37,7 @@ def testfunc(child): expect_binary(child) child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/libfixmath_unittests/tests/01-run.py b/tests/libfixmath_unittests/tests/01-run.py index 737987663f75a6c2d31a3782e6e930f08b74c49a..46ec14b31250c232d4bc0de12113beefc2a05951 100755 --- a/tests/libfixmath_unittests/tests/01-run.py +++ b/tests/libfixmath_unittests/tests/01-run.py @@ -13,6 +13,7 @@ import sys def testfunc(child): child.expect('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/lwip/tests/01-run.py b/tests/lwip/tests/01-run.py index f4e218bad8fc93c6c9c73073d1920cb0220c94f7..652455ccff123aedbe836b7e7321e50f4eff62d2 100755 --- a/tests/lwip/tests/01-run.py +++ b/tests/lwip/tests/01-run.py @@ -307,6 +307,7 @@ def test_triple_send(board_group, application, env=None): sender.expect_exact(u"Success: send 4 byte over TCP to server") receiver.expect(u"00000000 DE AD BE EF") + if __name__ == "__main__": TestStrategy().execute([BoardGroup((Board("native", "tap0"), Board("native", "tap1")))], diff --git a/tests/lwip_sock_ip/tests/01-run.py b/tests/lwip_sock_ip/tests/01-run.py index 36cd5a0a83e2bb4d2108acb70432263e9eda952f..c42a8a5da7b9b2d9353d3a79a966f035bd88b70c 100755 --- a/tests/lwip_sock_ip/tests/01-run.py +++ b/tests/lwip_sock_ip/tests/01-run.py @@ -95,6 +95,7 @@ def testfunc(child): child.expect_exact(u"Calling test_sock_ip_send6__no_sock()") child.expect_exact(u"ALL TESTS SUCCESSFUL") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/lwip_sock_tcp/tests/01-run.py b/tests/lwip_sock_tcp/tests/01-run.py index 5ceb51e3e236fb1f053da9b75d820cf5ac657ee6..b6accd3911994bd9c0c5499ca90404854a73a00c 100755 --- a/tests/lwip_sock_tcp/tests/01-run.py +++ b/tests/lwip_sock_tcp/tests/01-run.py @@ -89,6 +89,7 @@ def testfunc(child): child.expect_exact("Calling test_tcp_write6__success()") child.expect_exact(u"ALL TESTS SUCCESSFUL") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/lwip_sock_udp/tests/01-run.py b/tests/lwip_sock_udp/tests/01-run.py index 7cbc8007b3bf536f7e8ebef7d1bfbd79c5c21cae..931602586eb4c17b46c6d54042a928e063dd8070 100755 --- a/tests/lwip_sock_udp/tests/01-run.py +++ b/tests/lwip_sock_udp/tests/01-run.py @@ -107,6 +107,7 @@ def testfunc(child): child.expect_exact(u"Calling test_sock_udp_send6__no_sock()") child.expect_exact(u"ALL TESTS SUCCESSFUL") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/msg_avail/tests/01-run.py b/tests/msg_avail/tests/01-run.py index fab469c90508150d2d80797833f955aa78621110..2a924bfa85e0e1d8ef0e6966a283ae1a1b6d1cfb 100755 --- a/tests/msg_avail/tests/01-run.py +++ b/tests/msg_avail/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect_exact(u"[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/msg_send_receive/tests/01-run.py b/tests/msg_send_receive/tests/01-run.py index 26a28d1a2d6341c30edcc47c20e46365910c184a..5fded2dae61ae585dc17faedab413be706d1bfde 100755 --- a/tests/msg_send_receive/tests/01-run.py +++ b/tests/msg_send_receive/tests/01-run.py @@ -13,6 +13,7 @@ import sys def testfunc(child): child.expect(u"Test successful.") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/msg_try_receive/tests/01-run.py b/tests/msg_try_receive/tests/01-run.py index d69458c3f69bfd93e23f602e20edd4dc4e4ca61e..743b29a433c9b5705ea932964c82edfd37e95f39 100755 --- a/tests/msg_try_receive/tests/01-run.py +++ b/tests/msg_try_receive/tests/01-run.py @@ -8,6 +8,7 @@ def testfunc(child): child.expect('main starting') child.expect('msg available: 1 \(should be 1\!\)') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/mutex_order/tests/01-run.py b/tests/mutex_order/tests/01-run.py index 4dbeb32959d0367ea843a07c8c73c8f7f79de4d4..048a9dbe6bd9fe79c75a2352f2dac7908f9dba2b 100755 --- a/tests/mutex_order/tests/01-run.py +++ b/tests/mutex_order/tests/01-run.py @@ -29,6 +29,7 @@ def testfunc(child): assert(int(child.match.group(1)) > last) last = int(child.match.group(1)) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/mutex_unlock_and_sleep/tests/01-run.py b/tests/mutex_unlock_and_sleep/tests/01-run.py index 632c66ab10396862543eb88322f772421660d0f6..f02f97644bde95f6e9bfd9535f0b56141f864796 100755 --- a/tests/mutex_unlock_and_sleep/tests/01-run.py +++ b/tests/mutex_unlock_and_sleep/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): for i in range(20): child.expect(r"\[ALIVE\] alternated \d+k times.") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/netdev_test/tests/01-run.py b/tests/netdev_test/tests/01-run.py index 615046f4323731592936b9d59a58cd644fd2cf0a..60b6ababd8bb110546e62b7cd033309d1da1834f 100755 --- a/tests/netdev_test/tests/01-run.py +++ b/tests/netdev_test/tests/01-run.py @@ -21,6 +21,7 @@ def testfunc(child): child.expect_exact(' + succeeded.') child.expect_exact('ALL TESTS SUCCESSFUL') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/netstats_l2/tests/01-run.py b/tests/netstats_l2/tests/01-run.py index ee0e4e38f4da9786c48887e311254fcfba293fa3..c31495c6b01e41de65c06b0c67217e62fcf6ad81 100755 --- a/tests/netstats_l2/tests/01-run.py +++ b/tests/netstats_l2/tests/01-run.py @@ -18,6 +18,7 @@ def testfunc(child): child.expect(r' TX packets \d+ \(Multicast: \d+\) bytes \d+') child.expect(r' TX succeeded \d+ errors \d+') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/nhdp/tests/01-run.py b/tests/nhdp/tests/01-run.py index ee451a7d3ce836e6a92623b7772fec5a9263536b..a46a94f02c79c7007ab98885fe874a74e583545e 100755 --- a/tests/nhdp/tests/01-run.py +++ b/tests/nhdp/tests/01-run.py @@ -13,6 +13,7 @@ import sys def testfunc(child): child.expect_exact('SUCCESS: NHDP compiled!') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/od/tests/01-run.py b/tests/od/tests/01-run.py index d99d4300aec33d3899282dd7d617ffe485ef7adf..ab3fe4e95ed33780f34e7f4b53c033d0e1630e01 100755 --- a/tests/od/tests/01-run.py +++ b/tests/od/tests/01-run.py @@ -38,6 +38,7 @@ def testfunc(child): print("All tests successful") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/od/tests/02-run.py b/tests/od/tests/02-run.py index 3e99f59b9b35529844391b419c9dd3439211b01d..d16afbf34a3c005bf817bf7ce8c5240fb852917f 100755 --- a/tests/od/tests/02-run.py +++ b/tests/od/tests/02-run.py @@ -38,6 +38,7 @@ def testfunc(child): print("All tests successful") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/periph_timer/tests/01-run.py b/tests/periph_timer/tests/01-run.py index 5e6a8f7cd0eeecadbfcd476688e6e2d50905e7a8..cdf9c11ebe4ccc6d2205589741ec6fa2c9514549 100755 --- a/tests/periph_timer/tests/01-run.py +++ b/tests/periph_timer/tests/01-run.py @@ -20,6 +20,7 @@ def testfunc(child): child.expect_exact('TIMER_{}: starting'.format(timer)) child.expect('TEST SUCCEEDED') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pipe/tests/01-run.py b/tests/pipe/tests/01-run.py index 8965b5a7204235ae9e47af2c58964cd8041926fb..27cc8421b9fce33037225eef7abed9ef409f0d12 100755 --- a/tests/pipe/tests/01-run.py +++ b/tests/pipe/tests/01-run.py @@ -28,6 +28,7 @@ def testfunc(child): child.expect_exact('End read: <YZ> [24:26]') child.expect_exact('End done.') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_jsmn/tests/01-run.py b/tests/pkg_jsmn/tests/01-run.py index c5e46800e7fa5ec94d32d9a87a7ab9d782c061c4..c6809554cc9a1d486881cc52f66ea1711d5ba51e 100755 --- a/tests/pkg_jsmn/tests/01-run.py +++ b/tests/pkg_jsmn/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect_exact(' * audio') child.expect_exact(' * video') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_libcoap/tests/01-run.py b/tests/pkg_libcoap/tests/01-run.py index dd4a7748f4f10e7d9ac3845373dfb5decc69ffe2..5585a69c7717beef3b54a944bda132ed770d4c48 100755 --- a/tests/pkg_libcoap/tests/01-run.py +++ b/tests/pkg_libcoap/tests/01-run.py @@ -7,6 +7,7 @@ import sys def testfunc(child): child.expect_exact('SUCCESS: Libcoap compiled!') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run 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 4118445bca16328ca17692a120b8e5a75f96d8ba..4972ee4e99d6f310ffe8db5def2bcdac603c769c 100755 --- a/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py +++ b/tests/pkg_micro-ecc-with-hwrng/tests/01-run.py @@ -11,6 +11,7 @@ def testfunc(child): child.expect_exact('................ done with 0 error(s)') child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_micro-ecc/tests/01-run.py b/tests/pkg_micro-ecc/tests/01-run.py index 513681ac138f2c1269d93a156bff0101e3178f62..3ac2468653fa3c96baf6ef9d06a0daab6841b8b0 100755 --- a/tests/pkg_micro-ecc/tests/01-run.py +++ b/tests/pkg_micro-ecc/tests/01-run.py @@ -11,6 +11,7 @@ def testfunc(child): child.expect_exact('................ done with 0 error(s)') child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_minmea/tests/01-run.py b/tests/pkg_minmea/tests/01-run.py index dc6d8b5472fb2fd87ec079b376286776b6a1bdc8..3d845b954243cae0e946164c749cea1a029e31df 100755 --- a/tests/pkg_minmea/tests/01-run.py +++ b/tests/pkg_minmea/tests/01-run.py @@ -8,6 +8,7 @@ def testfunc(child): child.expect_exact('START') child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_tiny-asn1/tests/01-run.py b/tests/pkg_tiny-asn1/tests/01-run.py index 674ed5a8ed71decd071b99677905aefd34e1c763..21c0545f520b414df81e3283b74832a5aabfe5fe 100755 --- a/tests/pkg_tiny-asn1/tests/01-run.py +++ b/tests/pkg_tiny-asn1/tests/01-run.py @@ -14,6 +14,7 @@ import sys def testfunc(child): child.expect('Decoding finished succesfully') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_u8g2/tests/01-run.py b/tests/pkg_u8g2/tests/01-run.py index a8000938a8b482f616eb84f152124e082bc78a1d..0f092935e29b21b5d349329eb3dbacc79e78f41c 100755 --- a/tests/pkg_u8g2/tests/01-run.py +++ b/tests/pkg_u8g2/tests/01-run.py @@ -69,6 +69,7 @@ def testfunc(child): for line in EXPECTED_STDOUT: child.expect_exact(line) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pkg_umorse/tests/01-run.py b/tests/pkg_umorse/tests/01-run.py index b3fe164f1e690b78ec1ed61a8c14e93d65c7a489..d6f6bf65e522b19b9979f05ee8c1c651545ac7eb 100755 --- a/tests/pkg_umorse/tests/01-run.py +++ b/tests/pkg_umorse/tests/01-run.py @@ -19,6 +19,7 @@ def testfunc(child): child.expect_exact("[SUCCESS]", timeout=120) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/posix_semaphore/tests/01-run.py b/tests/posix_semaphore/tests/01-run.py index cb5bf3a01b95de0873be7131cfe4e7143028e671..45d7bb23a731bd6830bd08deb37d7e2cd1a27f51 100755 --- a/tests/posix_semaphore/tests/01-run.py +++ b/tests/posix_semaphore/tests/01-run.py @@ -96,6 +96,7 @@ def testfunc(child): test4(child) child.expect("######################### DONE") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/posix_time/tests/01-run.py b/tests/posix_time/tests/01-run.py index 324ea3393d2b5f8bc37a063aeb3781c0de7919aa..1bc62b9926af550ad429f0f1749221ef88b74449 100755 --- a/tests/posix_time/tests/01-run.py +++ b/tests/posix_time/tests/01-run.py @@ -44,6 +44,7 @@ def testfunc(child): print(e) sys.exit(1) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/ps_schedstatistics/tests/01-run.py b/tests/ps_schedstatistics/tests/01-run.py index 5d76f3d60846bac6e23424ae01195082564750a8..48448c2807ed59ad4f2426123fa585543e6fcab0 100755 --- a/tests/ps_schedstatistics/tests/01-run.py +++ b/tests/ps_schedstatistics/tests/01-run.py @@ -58,6 +58,7 @@ def testfunc(child): _check_help(child) _check_ps(child) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/pthread_tls/tests/01-run.py b/tests/pthread_tls/tests/01-run.py index 004395d4e0f0819be428e5aab0a65d94e288fd1e..2ea9d9893f254a4d5a6c7410ba99a83fa6376d78 100755 --- a/tests/pthread_tls/tests/01-run.py +++ b/tests/pthread_tls/tests/01-run.py @@ -34,6 +34,7 @@ def testfunc(child): child.expect('tls tests finished.') child.expect('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/rmutex/tests/01-run.py b/tests/rmutex/tests/01-run.py index a68a109ce7f62631814a7fa97043e8be11c9654d..669015f36f13417ce29948f7ec51163e8747ef5c 100755 --- a/tests/rmutex/tests/01-run.py +++ b/tests/rmutex/tests/01-run.py @@ -43,6 +43,7 @@ def testfunc(child): child.expect(u"T%i \(prio %i, depth %i\): locked rmutex now" % (T, thread_prio[T], depth)) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/sched_testing/tests/01-run.py b/tests/sched_testing/tests/01-run.py index c383d790111f15251837893d2f3b8a73eea54761..17abd6b816a7ff4c5d0e1d91925e673c1e67b0e7 100755 --- a/tests/sched_testing/tests/01-run.py +++ b/tests/sched_testing/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect_exact('yield 2') child.expect_exact('done') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/shell/tests/01-run.py b/tests/shell/tests/01-run.py index c2e309f654fcf11ae0b02869bde7a6db8c8d4f7c..f67aa8c819db43393983fe452b9faad6953e9e29 100755 --- a/tests/shell/tests/01-run.py +++ b/tests/shell/tests/01-run.py @@ -54,6 +54,7 @@ def testfunc(child): for cmd, expected in CMDS.items(): check_cmd(child, cmd, expected) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/sizeof_tcb/tests/01-run.py b/tests/sizeof_tcb/tests/01-run.py index 831ee218ac2a1ff2492c6114d480062734975442..9151e83d87c4cc09c4b3405ff3858d7445f32dfc 100755 --- a/tests/sizeof_tcb/tests/01-run.py +++ b/tests/sizeof_tcb/tests/01-run.py @@ -24,6 +24,7 @@ def testfunc(child): child.expect_exact('\tmsg_array 4 32') child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/ssp/tests/01-run.py b/tests/ssp/tests/01-run.py index 8b5334ff8a4a421cb260c87985a8d1a167a93145..604ea034c6f57a1050ffb3d3bdd442d64a8dbfb5 100755 --- a/tests/ssp/tests/01-run.py +++ b/tests/ssp/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect_exact('calling stack corruption function') child.expect('.*stack smashing detected.*') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/struct_tm_utility/tests/01-run.py b/tests/struct_tm_utility/tests/01-run.py index 91fa7fa48965ca43c82d79912ea56ea0b7c59c0d..10c78eafccc7258f347261195eeeabf27a8f20a2 100755 --- a/tests/struct_tm_utility/tests/01-run.py +++ b/tests/struct_tm_utility/tests/01-run.py @@ -112,6 +112,7 @@ def testfunc(child): _check_doomsday(child) _check_day(child) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/thread_basic/tests/01-run.py b/tests/thread_basic/tests/01-run.py index 74e3fcd77a2149a9cbcc115801b5042757fe7fbe..1b98ddde0c5a1930000eb1b00a4431494387dc7f 100755 --- a/tests/thread_basic/tests/01-run.py +++ b/tests/thread_basic/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect('first thread\r\n') child.expect('second thread\r\n') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/thread_cooperation/tests/01-run.py b/tests/thread_cooperation/tests/01-run.py index 84bcbbb0d98d9fd6f0bdfff7dea567b5eeddefec..a39fff35fbacbf71fbd7e88d19cb82c3eeb769de 100755 --- a/tests/thread_cooperation/tests/01-run.py +++ b/tests/thread_cooperation/tests/01-run.py @@ -16,6 +16,7 @@ def testfunc(child): child.expect(r"MAIN: \d+! = \d+") child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/thread_flood/tests/01-run.py b/tests/thread_flood/tests/01-run.py index 7e7cb558600a15eb363b5c4aedaa3f1ba5c0a370..752bd40064f97ec863478a44db29c1d92289332f 100755 --- a/tests/thread_flood/tests/01-run.py +++ b/tests/thread_flood/tests/01-run.py @@ -9,6 +9,7 @@ def testfunc(child): child.expect(r'\.+') child.expect(r'\[SUCCESS\] created \d+') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/thread_msg/tests/01-run.py b/tests/thread_msg/tests/01-run.py index 57d9f326e53a5370666ff5e993b57388ad81b225..bb96337064df487444814f7efe37dc2059ff3eec 100755 --- a/tests/thread_msg/tests/01-run.py +++ b/tests/thread_msg/tests/01-run.py @@ -12,6 +12,7 @@ def testfunc(child): child.expect_exact('THREAD 1 end') child.expect_exact('SUCCESS') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run 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 3ab9705cbf685dfc2a57a34008415a85f28b031a..0854f15cb896c29893eff8ac7d6d6897a8a44b37 100755 --- a/tests/thread_msg_block_w_queue/tests/01-run.py +++ b/tests/thread_msg_block_w_queue/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect('sender_thread start\r\n') child.expect('main thread alive\r\n') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run 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 3ab9705cbf685dfc2a57a34008415a85f28b031a..0854f15cb896c29893eff8ac7d6d6897a8a44b37 100755 --- a/tests/thread_msg_block_wo_queue/tests/01-run.py +++ b/tests/thread_msg_block_wo_queue/tests/01-run.py @@ -14,6 +14,7 @@ def testfunc(child): child.expect('sender_thread start\r\n') child.expect('main thread alive\r\n') + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/trickle/tests/01-run.py b/tests/trickle/tests/01-run.py index 47afeebe73496ebd3d8dd203da26cbd85c481a46..5e2ad97afbab99979949c4f074dd6e616d8c71bf 100755 --- a/tests/trickle/tests/01-run.py +++ b/tests/trickle/tests/01-run.py @@ -23,6 +23,7 @@ def testfunc(child): child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/unittests/tests/01-run.py b/tests/unittests/tests/01-run.py index 48b7ac912ec1a6d03cf8d2081a730ba63e95af09..91c513a2bfdafcd7baf7f47698fbd732325ab98e 100755 --- a/tests/unittests/tests/01-run.py +++ b/tests/unittests/tests/01-run.py @@ -13,6 +13,7 @@ import sys def testfunc(child): child.expect(u"OK \\([0-9]+ tests\\)") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/warn_conflict/tests/01-make.py b/tests/warn_conflict/tests/01-make.py index 29961ba8ce7771aa6899b26c2204ff9f23bbd275..a82a2b261481eb5bd844b44d4439e18b13df36bf 100755 --- a/tests/warn_conflict/tests/01-make.py +++ b/tests/warn_conflict/tests/01-make.py @@ -45,5 +45,6 @@ def testfunc(): finally: child.close() + if __name__ == '__main__': testfunc() diff --git a/tests/xtimer_hang/tests/01-run.py b/tests/xtimer_hang/tests/01-run.py index 68676388e205c8fa69c6c2bac4b25ca84a8e3df8..2ef612c3a6547657993d79db9a6361b7d2a18c39 100755 --- a/tests/xtimer_hang/tests/01-run.py +++ b/tests/xtimer_hang/tests/01-run.py @@ -20,6 +20,7 @@ def testfunc(child): child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_msg_receive_timeout/tests/01-run.py b/tests/xtimer_msg_receive_timeout/tests/01-run.py index 2de740b507ac7bdcd255cf0501a229d34fe27fac..c54de66bb843f6b01957d59cd2d8ca425b0acb02 100755 --- a/tests/xtimer_msg_receive_timeout/tests/01-run.py +++ b/tests/xtimer_msg_receive_timeout/tests/01-run.py @@ -17,6 +17,7 @@ def testfunc(child): child.expect("Timeout!") child.expect("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_now64_continuity/tests/01-run.py b/tests/xtimer_now64_continuity/tests/01-run.py index 471c537dab2439be3b7276dcd0743fdaa4347367..bf08342222f86638c20ba3a3513c812a7ef1d58f 100755 --- a/tests/xtimer_now64_continuity/tests/01-run.py +++ b/tests/xtimer_now64_continuity/tests/01-run.py @@ -15,6 +15,7 @@ def testfunc(child): child.expect(u"\[RESULTS\] min=\d+, avg=\d+, max=\d+") child.expect_exact("[SUCCESS]") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_periodic_wakeup/tests/01-run.py b/tests/xtimer_periodic_wakeup/tests/01-run.py index 6012617a75fd17a07e11a8848cd25c5bc5fabdaf..6f243b1bdd51af029b64a3d941f897ffae94e657 100755 --- a/tests/xtimer_periodic_wakeup/tests/01-run.py +++ b/tests/xtimer_periodic_wakeup/tests/01-run.py @@ -21,6 +21,7 @@ def testfunc(child): child.expect(u"Min/max error: \d+/\d+") child.expect_exact("Test complete.") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_remove/tests/01-run.py b/tests/xtimer_remove/tests/01-run.py index 56dfa19f28bb842b23ba93dde567992d364caab3..5f964eb1be8fdecf279a6eff4e3462d002548843 100755 --- a/tests/xtimer_remove/tests/01-run.py +++ b/tests/xtimer_remove/tests/01-run.py @@ -23,6 +23,7 @@ def testfunc(child): child.expect_exact("timer 1 triggered.") child.expect_exact("test successful.") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_reset/tests/01-run.py b/tests/xtimer_reset/tests/01-run.py index 11af527564a91ea67cb052af5dd762a0d1b32cef..911073c2b84ab1bc94f3ddce3e94208e997192dc 100755 --- a/tests/xtimer_reset/tests/01-run.py +++ b/tests/xtimer_reset/tests/01-run.py @@ -19,6 +19,7 @@ def testfunc(child): child.expect(u"now=\d+") child.expect_exact("Test completed!") + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_usleep/tests/01-run.py b/tests/xtimer_usleep/tests/01-run.py index 01c5fc6c3b72c9870017b93a5d333673319f47c8..74ba91d31de97b832feed01864e5111e90cc79dc 100755 --- a/tests/xtimer_usleep/tests/01-run.py +++ b/tests/xtimer_usleep/tests/01-run.py @@ -51,6 +51,7 @@ def testfunc(child): print(e) sys.exit(1) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run diff --git a/tests/xtimer_usleep_short/tests/01-run.py b/tests/xtimer_usleep_short/tests/01-run.py index fb43acd7480c8fecf0d2a25a55e0eff84d5becfa..815c166e0d9a32ec98b9ee4206176df2f3395417 100755 --- a/tests/xtimer_usleep_short/tests/01-run.py +++ b/tests/xtimer_usleep_short/tests/01-run.py @@ -27,6 +27,7 @@ def testfunc(child): child.expect(u"[SUCCESS]", timeout=3) + if __name__ == "__main__": sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) from testrunner import run