diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-03-14 08:20:54 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-03-27 07:21:31 +0100 |
commit | cbfc3415607a6943823e8fc47c38408dcc7dbd90 (patch) | |
tree | be339544970fd3cae506c38521d98aa173ebedf7 /testsuites/libtests/ttest01/t-self-test.h | |
parent | Add RTEMS Test Framework (diff) | |
download | rtems-cbfc3415607a6943823e8fc47c38408dcc7dbd90.tar.bz2 |
ttest01: New test
This is an example test using the RTEMS Test Framework. It tests also
the framework itself.
Add T_FILE_NAME command line define to get rid of the full file path.
This is important to reduce the read-only data of test files and make
them build system independent.
Update #3199.
Diffstat (limited to '')
-rw-r--r-- | testsuites/libtests/ttest01/t-self-test.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/testsuites/libtests/ttest01/t-self-test.h b/testsuites/libtests/ttest01/t-self-test.h new file mode 100644 index 0000000000..1035872c9d --- /dev/null +++ b/testsuites/libtests/ttest01/t-self-test.h @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2019 embedded brains GmbH + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef THE_T_TEST_FRAMEWORK_SELF_TEST_H +#define THE_T_TEST_FRAMEWORK_SELF_TEST_H + +#include <rtems/linkersets.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +RTEMS_LINKER_ROSET_DECLARE(t_self_test, const char *); + +#define T_TEST_OUTPUT(name, output) \ + RTEMS_LINKER_ROSET_ITEM(t_self_test, const char *, name) = #name ":" output + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* THE_T_TEST_FRAMEWORK_SELF_TEST_H */ |