1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/pkg_fatfs_vfs/tests-with-config/01-run.py
Gaëtan Harter 80b9290bb1
tests/pkg_fatfs_vfs: declare test as test-with-config
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.
2021-01-25 21:10:06 +01:00

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))