[PATCH] tests: Use rtems_test_begin and rtems_test_end.
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Nov 8 06:12:53 UTC 2017
On 07/11/17 22:27, Chris Johns wrote:
> +typedef enum
> +{
> + RTEMS_TEST_STATE_PASS,
> + RTEMS_TEST_STATE_FAIL,
> + RTEMS_TEST_STATE_USER_INPUT,
> + RTEMS_TEST_STATE_INDETERMINATE,
> + RTEMS_TEST_STATE_BENCHMARK
> +} RTEMS_TEST_STATE;
>
> -/**
> - * @brief End of test message format string.
> - */
> -#define TEST_END_STRING "*** END OF TEST %s ***\n", rtems_test_name
> +#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
> +
> +#if TEST_STATE_EXPECTED_FAIL
> + #define TEST_STATE RTEMS_TEST_STATE_FAIL
> +#elif TEST_STATE_USER_INPUT
> + #define TEST_STATE RTEMS_TEST_STATE_USER_INPUT
> +#elif TEST_STATE_INDETERMINATE
> + #define TEST_STATE RTEMS_TEST_STATE_INDETERMINATE
> +#elif TEST_STATE_BENCHMARK
> + #define TEST_STATE RTEMS_TEST_STATE_BENCHMARK
> +#else
> + #define TEST_STATE RTEMS_TEST_STATE_PASS
> +#endif
My intention for suggesting the enum was to get rid of the uniqueness
test and change rtems-test-check and rtems-test-check.py accordingly.
There are loops in these scripts, e.g.
for test in tests:
if mode == 'exclude':
if 'exclude' not in testdata or test not in testdata['exclude']:
output += [test]
elif mode == 'flags':
for state in states:
if state != 'exclude' and state in testdata and test in
testdata[state]:
output += [defines[state]]
Is it possible that these scripts add multiple defines?
--
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