From e9903919489fc1f3932bcd1b0a47221d3538cce7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie <alexandre.abadie@inria.fr> Date: Thu, 17 Jan 2019 15:51:16 +0100 Subject: [PATCH] tests/periph_dma: add automatic testing of DMA over UART --- tests/periph_dma/main.c | 7 ++++++- tests/periph_dma/tests/01-run.py | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 tests/periph_dma/tests/01-run.py diff --git a/tests/periph_dma/main.c b/tests/periph_dma/main.c index c297ce8b9a..9347bcc4ad 100644 --- a/tests/periph_dma/main.c +++ b/tests/periph_dma/main.c @@ -21,7 +21,12 @@ int main(void) { - puts("DMA dummy test app"); + /* + This test is checking that DMA on UART is not broken when stdio UART is + configured with DMA. + Note that this message is also printed on 'normal' stdio UART (without DMA). + */ + puts("DMA is working"); return 0; } diff --git a/tests/periph_dma/tests/01-run.py b/tests/periph_dma/tests/01-run.py new file mode 100755 index 0000000000..191650f6ae --- /dev/null +++ b/tests/periph_dma/tests/01-run.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2019 Inria +# +# 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 + + +def testfunc(child): + child.expect_exact('DMA is working') + + +if __name__ == "__main__": + sys.exit(run(testfunc)) -- GitLab