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

Merge pull request #8247 from aabadie/pr/tests/python_E305

tests: fix python style E305
This commit is contained in:
Martine Lenders 2017-12-13 10:52:57 +01:00 committed by GitHub
commit ba2453d320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 78 additions and 0 deletions

View File

@ -17,6 +17,7 @@ def testfunc(child):
child.expect('\+ bitarithm_bits_set: \d+ iterations per second') child.expect('\+ bitarithm_bits_set: \d+ iterations per second')
child.expect_exact("Done.") child.expect_exact("Done.")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -20,6 +20,7 @@ def testfunc(child):
child.expect(".+ false positive rate.") child.expect(".+ false positive rate.")
child.expect_exact("All done!") child.expect_exact("All done!")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -20,6 +20,7 @@ def testfunc(child):
if index == 1: if index == 1:
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -48,6 +48,7 @@ def testfunc(child):
print("All tests successful") print("All tests successful")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -24,6 +24,7 @@ def testfunc(child):
child.expect_exact("Bye, bye.") child.expect_exact("Bye, bye.")
child.expect_exact("******************************************************") child.expect_exact("******************************************************")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -20,6 +20,7 @@ def testfunc(child):
child.expect_exact("Bye, bye.") child.expect_exact("Bye, bye.")
child.expect_exact("*****************************************") child.expect_exact("*****************************************")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -32,6 +32,7 @@ def testfunc(child):
child.expect_exact("Bye, bye.") child.expect_exact("Bye, bye.")
child.expect_exact("******************************************") child.expect_exact("******************************************")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect([r"OK \([0-9]+ tests\)", child.expect([r"OK \([0-9]+ tests\)",
r"error: unable to initialize RTC \[I2C initialization error\]"]) r"error: unable to initialize RTC \[I2C initialization error\]"])
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact(u"[SUCCESS]", timeout=60) child.expect_exact(u"[SUCCESS]", timeout=60)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -15,6 +15,7 @@ def testfunc(child):
child.expect_exact("[START]") child.expect_exact("[START]")
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact("[SUCCESS]", timeout=60) child.expect_exact("[SUCCESS]", timeout=60)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact(u"[SUCCESS]") child.expect_exact(u"[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -28,6 +28,7 @@ def testfunc(child):
print("") print("")
print("All tests successful") print("All tests successful")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -22,6 +22,7 @@ def testfunc(child):
print("Stopped after %i iterations, but should run forever." % how_many) print("Stopped after %i iterations, but should run forever." % how_many)
print("=> All tests successful") print("=> All tests successful")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect_exact("Testing floating point arithmetics...") child.expect_exact("Testing floating point arithmetics...")
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -8,6 +8,7 @@ def testfunc(child):
child.expect_exact('If you can read this:') child.expect_exact('If you can read this:')
child.expect_exact('Test successful.') child.expect_exact('Test successful.')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -37,6 +37,7 @@ def testfunc(child):
child.expect_exact("ipv6: forward nh = 17 to other threads") child.expect_exact("ipv6: forward nh = 17 to other threads")
child.expect_exact("pkt->users: 0") child.expect_exact("pkt->users: 0")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect(r"OK \(\d+ tests\)") child.expect(r"OK \(\d+ tests\)")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect(r"OK \(\d+ tests\)") child.expect(r"OK \(\d+ tests\)")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -15,6 +15,7 @@ def testfunc(child):
# 1st 6LoWPAN fragment # 1st 6LoWPAN fragment
child.expect(r"OK \(\d+ tests\)") child.expect(r"OK \(\d+ tests\)")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -136,6 +136,7 @@ def testfunc(child):
child.expect("dst_l2addr: 3e:e6:b5:22:fd:0a") child.expect("dst_l2addr: 3e:e6:b5:22:fd:0a")
child.expect("~~ PKT - 2 snips, total size: 61 byte") child.expect("~~ PKT - 2 snips, total size: 61 byte")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -74,6 +74,7 @@ def testfunc(child):
child.expect_exact("source address: fe80::ff:fe00:2") child.expect_exact("source address: fe80::ff:fe00:2")
child.expect_exact("destination address: fd01::1") child.expect_exact("destination address: fd01::1")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -47,6 +47,7 @@ def testfunc(child):
child.expect_exact(u"Calling test_sock_ip_send__no_sock()") child.expect_exact(u"Calling test_sock_ip_send__no_sock()")
child.expect_exact(u"ALL TESTS SUCCESSFUL") child.expect_exact(u"ALL TESTS SUCCESSFUL")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -51,6 +51,7 @@ def testfunc(child):
child.expect_exact(u"Calling test_sock_udp_send__no_sock()") child.expect_exact(u"Calling test_sock_udp_send__no_sock()")
child.expect_exact(u"ALL TESTS SUCCESSFUL") child.expect_exact(u"ALL TESTS SUCCESSFUL")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -8,6 +8,7 @@ def testfunc(child):
child.expect('START') child.expect('START')
child.expect('SUCCESS') child.expect('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -37,6 +37,7 @@ def testfunc(child):
expect_binary(child) expect_binary(child)
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -13,6 +13,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect('SUCCESS') child.expect('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -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") sender.expect_exact(u"Success: send 4 byte over TCP to server")
receiver.expect(u"00000000 DE AD BE EF") receiver.expect(u"00000000 DE AD BE EF")
if __name__ == "__main__": if __name__ == "__main__":
TestStrategy().execute([BoardGroup((Board("native", "tap0"), TestStrategy().execute([BoardGroup((Board("native", "tap0"),
Board("native", "tap1")))], Board("native", "tap1")))],

View File

@ -95,6 +95,7 @@ def testfunc(child):
child.expect_exact(u"Calling test_sock_ip_send6__no_sock()") child.expect_exact(u"Calling test_sock_ip_send6__no_sock()")
child.expect_exact(u"ALL TESTS SUCCESSFUL") child.expect_exact(u"ALL TESTS SUCCESSFUL")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -89,6 +89,7 @@ def testfunc(child):
child.expect_exact("Calling test_tcp_write6__success()") child.expect_exact("Calling test_tcp_write6__success()")
child.expect_exact(u"ALL TESTS SUCCESSFUL") child.expect_exact(u"ALL TESTS SUCCESSFUL")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -107,6 +107,7 @@ def testfunc(child):
child.expect_exact(u"Calling test_sock_udp_send6__no_sock()") child.expect_exact(u"Calling test_sock_udp_send6__no_sock()")
child.expect_exact(u"ALL TESTS SUCCESSFUL") child.expect_exact(u"ALL TESTS SUCCESSFUL")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact(u"[SUCCESS]") child.expect_exact(u"[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -13,6 +13,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect(u"Test successful.") child.expect(u"Test successful.")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -8,6 +8,7 @@ def testfunc(child):
child.expect('main starting') child.expect('main starting')
child.expect('msg available: 1 \(should be 1\!\)') child.expect('msg available: 1 \(should be 1\!\)')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -29,6 +29,7 @@ def testfunc(child):
assert(int(child.match.group(1)) > last) assert(int(child.match.group(1)) > last)
last = int(child.match.group(1)) last = int(child.match.group(1))
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
for i in range(20): for i in range(20):
child.expect(r"\[ALIVE\] alternated \d+k times.") child.expect(r"\[ALIVE\] alternated \d+k times.")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -21,6 +21,7 @@ def testfunc(child):
child.expect_exact(' + succeeded.') child.expect_exact(' + succeeded.')
child.expect_exact('ALL TESTS SUCCESSFUL') child.expect_exact('ALL TESTS SUCCESSFUL')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -18,6 +18,7 @@ def testfunc(child):
child.expect(r' TX packets \d+ \(Multicast: \d+\) bytes \d+') child.expect(r' TX packets \d+ \(Multicast: \d+\) bytes \d+')
child.expect(r' TX succeeded \d+ errors \d+') child.expect(r' TX succeeded \d+ errors \d+')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -13,6 +13,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact('SUCCESS: NHDP compiled!') child.expect_exact('SUCCESS: NHDP compiled!')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -38,6 +38,7 @@ def testfunc(child):
print("All tests successful") print("All tests successful")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -38,6 +38,7 @@ def testfunc(child):
print("All tests successful") print("All tests successful")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -20,6 +20,7 @@ def testfunc(child):
child.expect_exact('TIMER_{}: starting'.format(timer)) child.expect_exact('TIMER_{}: starting'.format(timer))
child.expect('TEST SUCCEEDED') child.expect('TEST SUCCEEDED')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -28,6 +28,7 @@ def testfunc(child):
child.expect_exact('End read: <YZ> [24:26]') child.expect_exact('End read: <YZ> [24:26]')
child.expect_exact('End done.') child.expect_exact('End done.')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect_exact(' * audio') child.expect_exact(' * audio')
child.expect_exact(' * video') child.expect_exact(' * video')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -7,6 +7,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect_exact('SUCCESS: Libcoap compiled!') child.expect_exact('SUCCESS: Libcoap compiled!')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -11,6 +11,7 @@ def testfunc(child):
child.expect_exact('................ done with 0 error(s)') child.expect_exact('................ done with 0 error(s)')
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -11,6 +11,7 @@ def testfunc(child):
child.expect_exact('................ done with 0 error(s)') child.expect_exact('................ done with 0 error(s)')
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -8,6 +8,7 @@ def testfunc(child):
child.expect_exact('START') child.expect_exact('START')
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect('Decoding finished succesfully') child.expect('Decoding finished succesfully')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -69,6 +69,7 @@ def testfunc(child):
for line in EXPECTED_STDOUT: for line in EXPECTED_STDOUT:
child.expect_exact(line) child.expect_exact(line)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -19,6 +19,7 @@ def testfunc(child):
child.expect_exact("[SUCCESS]", timeout=120) child.expect_exact("[SUCCESS]", timeout=120)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -96,6 +96,7 @@ def testfunc(child):
test4(child) test4(child)
child.expect("######################### DONE") child.expect("######################### DONE")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -44,6 +44,7 @@ def testfunc(child):
print(e) print(e)
sys.exit(1) sys.exit(1)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -58,6 +58,7 @@ def testfunc(child):
_check_help(child) _check_help(child)
_check_ps(child) _check_ps(child)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -34,6 +34,7 @@ def testfunc(child):
child.expect('tls tests finished.') child.expect('tls tests finished.')
child.expect('SUCCESS') child.expect('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -43,6 +43,7 @@ def testfunc(child):
child.expect(u"T%i \(prio %i, depth %i\): locked rmutex now" % child.expect(u"T%i \(prio %i, depth %i\): locked rmutex now" %
(T, thread_prio[T], depth)) (T, thread_prio[T], depth))
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect_exact('yield 2') child.expect_exact('yield 2')
child.expect_exact('done') child.expect_exact('done')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -54,6 +54,7 @@ def testfunc(child):
for cmd, expected in CMDS.items(): for cmd, expected in CMDS.items():
check_cmd(child, cmd, expected) check_cmd(child, cmd, expected)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -24,6 +24,7 @@ def testfunc(child):
child.expect_exact('\tmsg_array 4 32') child.expect_exact('\tmsg_array 4 32')
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect_exact('calling stack corruption function') child.expect_exact('calling stack corruption function')
child.expect('.*stack smashing detected.*') child.expect('.*stack smashing detected.*')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -112,6 +112,7 @@ def testfunc(child):
_check_doomsday(child) _check_doomsday(child)
_check_day(child) _check_day(child)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect('first thread\r\n') child.expect('first thread\r\n')
child.expect('second thread\r\n') child.expect('second thread\r\n')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -16,6 +16,7 @@ def testfunc(child):
child.expect(r"MAIN: \d+! = \d+") child.expect(r"MAIN: \d+! = \d+")
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -9,6 +9,7 @@ def testfunc(child):
child.expect(r'\.+') child.expect(r'\.+')
child.expect(r'\[SUCCESS\] created \d+') child.expect(r'\[SUCCESS\] created \d+')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -12,6 +12,7 @@ def testfunc(child):
child.expect_exact('THREAD 1 end') child.expect_exact('THREAD 1 end')
child.expect_exact('SUCCESS') child.expect_exact('SUCCESS')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect('sender_thread start\r\n') child.expect('sender_thread start\r\n')
child.expect('main thread alive\r\n') child.expect('main thread alive\r\n')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -14,6 +14,7 @@ def testfunc(child):
child.expect('sender_thread start\r\n') child.expect('sender_thread start\r\n')
child.expect('main thread alive\r\n') child.expect('main thread alive\r\n')
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -23,6 +23,7 @@ def testfunc(child):
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -13,6 +13,7 @@ import sys
def testfunc(child): def testfunc(child):
child.expect(u"OK \\([0-9]+ tests\\)") child.expect(u"OK \\([0-9]+ tests\\)")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -45,5 +45,6 @@ def testfunc():
finally: finally:
child.close() child.close()
if __name__ == '__main__': if __name__ == '__main__':
testfunc() testfunc()

View File

@ -20,6 +20,7 @@ def testfunc(child):
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -17,6 +17,7 @@ def testfunc(child):
child.expect("Timeout!") child.expect("Timeout!")
child.expect("[SUCCESS]") child.expect("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -15,6 +15,7 @@ def testfunc(child):
child.expect(u"\[RESULTS\] min=\d+, avg=\d+, max=\d+") child.expect(u"\[RESULTS\] min=\d+, avg=\d+, max=\d+")
child.expect_exact("[SUCCESS]") child.expect_exact("[SUCCESS]")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -21,6 +21,7 @@ def testfunc(child):
child.expect(u"Min/max error: \d+/\d+") child.expect(u"Min/max error: \d+/\d+")
child.expect_exact("Test complete.") child.expect_exact("Test complete.")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -23,6 +23,7 @@ def testfunc(child):
child.expect_exact("timer 1 triggered.") child.expect_exact("timer 1 triggered.")
child.expect_exact("test successful.") child.expect_exact("test successful.")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -19,6 +19,7 @@ def testfunc(child):
child.expect(u"now=\d+") child.expect(u"now=\d+")
child.expect_exact("Test completed!") child.expect_exact("Test completed!")
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -51,6 +51,7 @@ def testfunc(child):
print(e) print(e)
sys.exit(1) sys.exit(1)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run

View File

@ -27,6 +27,7 @@ def testfunc(child):
child.expect(u"[SUCCESS]", timeout=3) child.expect(u"[SUCCESS]", timeout=3)
if __name__ == "__main__": if __name__ == "__main__":
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
from testrunner import run from testrunner import run