1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 07:21:18 +01:00

unittests: fix for python3

This commit is contained in:
Martine Lenders 2016-01-27 03:51:41 +01:00 committed by Martine Lenders
parent 94bbd055a5
commit 0f7f9fe986

View File

@ -13,7 +13,8 @@ DEFAULT_TIMEOUT = 5
def main():
env = os.environ.copy()
child = spawn("make term", env=env, timeout=DEFAULT_TIMEOUT)
child = spawn("make term", env=env, timeout=DEFAULT_TIMEOUT,
encoding="utf-8")
child.logfile = sys.stdout
try:
@ -23,7 +24,7 @@ def main():
# make reset yields error on some boards even if successful
pass
try:
child.expect(r"OK \([0-9]+ tests\)")
child.expect(u"OK \\([0-9]+ tests\\)")
except TIMEOUT:
print("There where errors in the unittests")
return 1