You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

#!/usr/bin/env python3
# Copyright (C) 2016 Freie Universität Berlin
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
from __future__ import print_function
import os
import sys
import time
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect(r"Testing generic evtimer \(start time = (\d+) ms\)")
timer_offset = int(
child.expect(r"Are the reception times of all (\d+) msgs close to the supposed values?")
numof = int(
for i in range(numof):
child.expect(r'At \s*(\d+) ms received msg %i: "supposed to be (\d+)"' % i)
stop = int(time.time() * 1000)
# check if output is correct
exp = int( + timer_offset
assert(int( in range(exp - ACCEPTED_ERROR, exp + ACCEPTED_ERROR + 1))
print(".", end="", flush=True)
print("All tests successful")
if __name__ == "__main__":
sys.exit(, echo=False))