diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-28 09:58:52 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-28 09:58:52 +0200 |
commit | 0ff2899a8e0d2c12e43f4c278d0eb7141495bef1 (patch) | |
tree | 8f8a06715910f062ab7b87d606229134145f84ca | |
parent | 23617b958da39d62a92ccbad1d35db4fb7aceb8a (diff) |
cpukit/libtest/testbeginend.cqual-29
-rw-r--r-- | cpukit/libtest/testbeginend.c | 35 | ||||
-rw-r--r-- | cpukit/libtest/testprinter.c | 49 |
2 files changed, 51 insertions, 33 deletions
diff --git a/cpukit/libtest/testbeginend.c b/cpukit/libtest/testbeginend.c index bacca81788..c0201ec41e 100644 --- a/cpukit/libtest/testbeginend.c +++ b/cpukit/libtest/testbeginend.c @@ -23,12 +23,6 @@ #include <rtems/version.h> #include <rtems/score/io.h> -#if !defined(RTEMS_QUAL_ONLY) -rtems_printer rtems_test_printer = { - .printer = rtems_printk_printer -}; -#endif - static const char* const test_state_strings[] = { "EXPECTED_PASS", @@ -40,7 +34,7 @@ static const char* const test_state_strings[] = int rtems_test_begin(const char* name, const RTEMS_TEST_STATE state) { -#if defined(RTEMS_QUAL_ONLY) +#if defined(RTEMS_QUAL) return _IO_Printf( rtems_put_char, NULL, @@ -83,7 +77,7 @@ int rtems_test_begin(const char* name, const RTEMS_TEST_STATE state) int rtems_test_end(const char* name) { -#if defined(RTEMS_QUAL_ONLY) +#if defined(RTEMS_QUAL) return _IO_Printf( rtems_put_char, NULL, @@ -94,28 +88,3 @@ int rtems_test_end(const char* name) "\n*** END OF TEST %s ***\n\n", name ); } - -#if !defined(RTEMS_QUAL_ONLY) -void rtems_test_exit(int status) -{ - (void) status; - rtems_shutdown_executive(0); -} - -int rtems_test_printf( - const char* format, - ... -) -{ - va_list ap; - int len; - va_start(ap, format); - len = rtems_vprintf( - &rtems_test_printer, - format, - ap - ); - va_end(ap); - return len; -} -#endif diff --git a/cpukit/libtest/testprinter.c b/cpukit/libtest/testprinter.c new file mode 100644 index 0000000000..5c2f0fedb3 --- /dev/null +++ b/cpukit/libtest/testprinter.c @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2014, 2018 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * Copyright (c) 2017 Chris Johns <chrisj@rtems.org>. All rights reserved. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/test-info.h> +#include <rtems/bspIo.h> + +rtems_printer rtems_test_printer = { + .printer = rtems_printk_printer +}; + +void rtems_test_exit(int status) +{ + (void) status; + rtems_shutdown_executive(0); +} + +int rtems_test_printf( + const char* format, + ... +) +{ + va_list ap; + int len; + va_start(ap, format); + len = rtems_vprintf( + &rtems_test_printer, + format, + ap + ); + va_end(ap); + return len; +} |