mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
80b9290bb1
For running the test on boards, it needs a manual setup. This however declares the "native" test as requiring config too. No need to be blacklisted when using test-with-config.
35 lines
879 B
Python
Executable File
35 lines
879 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# Copyright (C) 2017 HAW-Hamburg.de
|
|
#
|
|
# 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.
|
|
|
|
import sys
|
|
from testrunner import run
|
|
|
|
|
|
class TestFailed(Exception):
|
|
pass
|
|
|
|
|
|
def testfunc(child):
|
|
|
|
child.expect_exact("Tests for FatFs over VFS - test results will be printed"
|
|
" in the format test_name:result\r\n")
|
|
|
|
while True:
|
|
res = child.expect([r"[^\n]*:\[OK\]\r\n",
|
|
r"Test end.\r\n",
|
|
r".[^\n]*:\[FAILED\]\r\n",
|
|
r".*\r\n"])
|
|
if res > 1:
|
|
raise TestFailed(child.after.split(':', 1)[0] + " test failed!")
|
|
elif res == 1:
|
|
break
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(run(testfunc))
|