[PATCH 2/2] libmisc/testsupport: Add RTEMS version, build and tools to the tests.
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Nov 6 06:41:27 UTC 2017
On 06/11/17 07:29, Chris Johns wrote:
>>> +#if RTEMS_PROFILING
>>> + #define TEST_BUILD_DEFAULT ""
>>> + #define TEST_BUILD_PROFILING "profiling "
>>> +#else
>>> + #define TEST_BUILD_PROFILING
>>> +#endif
>> These defines are only used in one source file. I would move this to the source
>> file.
> Do all tests call the begin function in libmisc?
Yes, I hope that this is the case. Some tests use rtems_test_begin()
directly. These tests should be changed to use TEST_BEGIN() (or vice versa).
testsuites/samples/pppd/init.c: rtems_test_begin();
testsuites/samples/pppd/init.c: rtems_test_end();
testsuites/samples/loopback/init.c: rtems_test_begin();
testsuites/samples/loopback/init.c: rtems_test_end();
testsuites/samples/paranoia/init.c: rtems_test_begin();
testsuites/samples/paranoia/init.c: rtems_test_end();
testsuites/samples/hello/init.c: rtems_test_begin();
testsuites/samples/hello/init.c: rtems_test_end();
testsuites/samples/capture/init.c: rtems_test_begin();
testsuites/samples/capture/init.c: rtems_test_end();
testsuites/libtests/mathl/init.c: rtems_test_begin();
testsuites/libtests/mathl/init.c: rtems_test_end();
testsuites/libtests/mathf/init.c: rtems_test_begin();
testsuites/libtests/mathf/init.c: rtems_test_end();
testsuites/libtests/complex/init.c: rtems_test_begin();
testsuites/libtests/complex/init.c: rtems_test_end();
testsuites/libtests/capture01/init.c: rtems_test_begin();
testsuites/libtests/capture01/init.c: rtems_test_end();
testsuites/libtests/math/init.c: rtems_test_begin();
testsuites/libtests/math/init.c: rtems_test_end();
testsuites/smptests/smp07/init.c: rtems_test_end( );
testsuites/smptests/smp07/init.c: rtems_test_begin();
testsuites/smptests/smp05/init.c: rtems_test_end();
testsuites/smptests/smp05/init.c: rtems_test_begin();
> Happy to see that happen if the
> begin macro goes away. Maybe that can happen after this change?
>
>>> +
>>> +#define TEST_BUILD_STRING \
>>> + "*** TEST BUILD: " TEST_BUILD_DEFAULT \
>>> + TEST_BUILD_POSIX \
>>> + TEST_BUILD_SMP \
>>> + TEST_BUILD_MP \
>>> + TEST_BUILD_PARAVIRT \
>>> + TEST_BUILD_NETWORKING \
>>> + TEST_BUILD_DEBUG \
>>> + TEST_BUILD_PROFILING \
>>> + "\n"
>>> +
>>> +/**
>>> + * @brief Tools being used to build the kernel and tests.
>>> + */
>>> +#define TEST_TOOLS_STRING "*** TEST TOOLS: " __VERSION__ "\n"
>>> +
>>> +/**
>>> + * @brief Test states.
>>> + */
>>> +#if (TEST_STATE_EXPECTED_FAIL && TEST_STATE_USER_INPUT) || \
>>> + (TEST_STATE_EXPECTED_FAIL && TEST_STATE_INDETERMINATE) || \
>>> + (TEST_STATE_EXPECTED_FAIL && TEST_STATE_BENCHMARK) || \
>>> + (TEST_STATE_USER_INPUT && TEST_STATE_INDETERMINATE) || \
>>> + (TEST_STATE_USER_INPUT && TEST_STATE_BENCHMARK) || \
>>> + (TEST_STATE_INDETERMINATE && TEST_STATE_BENCHMARK)
>>> + #error Test states must be unique
>>> +#endif
>> Maybe we should separate the test classification from the actual output and use
>> an enum:
>>
>> typedef enum {
>> RTEMS_TEST_TYPE_USER_INPUT,
>> RTEMS_TEST_TYPE_BENCHMARK,
>> ...
>> } rtems_test_type;
>>
> How would the state be passed in as an enum? The test's state is passed on a per
> test bases from the .tcfg files structure which is global, and per bsp as
> command line defines.
You can do a "#define TEST_TYPE XXX", instead of the "#define
TEST_STATE_XXX".
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list