diff options
author | Chris Johns <chrisj@rtems.org> | 2016-12-05 14:53:54 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2016-12-07 17:22:41 +1100 |
commit | 28fda6279b82c07a673a8ebf875b77bb69695f1a (patch) | |
tree | b6c1b6a199664fa9bf6acb977c631e05efcaa4a9 /testsuites/support/include | |
parent | score: Simplify linker set API (diff) | |
download | rtems-28fda6279b82c07a673a8ebf875b77bb69695f1a.tar.bz2 |
testsuite: Add test states to the testsuit configuration files.
Change the testsuite configuration files to hold state information about
a test. The states are:
exclude - Do not build the test
expected-fail - The test is expected to fail
indeterminate - The test may pass or may fail
A message is printed just after the test's BEGIN message to indicate
there is a special state for the test. No state message means the test
is expected to pass.
This support requires tests are correctly written to the use standard
support to begin and end a test.
Diffstat (limited to 'testsuites/support/include')
-rw-r--r-- | testsuites/support/include/buffer_test_io.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h index ac73352768..1e396b7dcf 100644 --- a/testsuites/support/include/buffer_test_io.h +++ b/testsuites/support/include/buffer_test_io.h @@ -21,6 +21,20 @@ extern "C" { /* #define TESTS_USE_PRINTK */ /* + * Test states. No state string is an expected pass. + */ +#if TEST_STATE_EXPECTED_FAIL && \ + TEST_INDETERMINATE_FAIL + #error Test states must be unique +#endif + +#if TEST_STATE_EXPECTED_FAIL + #define TEST_STATE_STRING "*** TEST STATE: EXPECTED-FAIL\n" +#elif TEST_INDETERMINATE_FAIL + #define TEST_STATE_STRING "*** TEST STATE: INDETERMINATE\n" +#endif + +/* * USE PRINTK TO MINIMIZE SIZE */ #if defined(TESTS_USE_PRINTK) @@ -55,7 +69,11 @@ extern "C" { do { \ } while (0) - #define TEST_BEGIN() printk(TEST_BEGIN_STRING) + #if defined(TEST_STATE_STRING) + #define TEST_BEGIN() printk(TEST_BEGIN_STRING); printk(TEST_STATE_STRING); + #else + #define TEST_BEGIN() printk(TEST_BEGIN_STRING) + #endif #define TEST_END() printk(TEST_END_STRING) @@ -157,7 +175,11 @@ extern "C" { fflush(stdout); \ } while (0) - #define TEST_BEGIN() printf(TEST_BEGIN_STRING) + #if defined(TEST_STATE_STRING) + #define TEST_BEGIN() printf(TEST_BEGIN_STRING); printf(TEST_STATE_STRING) + #else + #define TEST_BEGIN() printf(TEST_BEGIN_STRING) + #endif #define TEST_END() printf(TEST_END_STRING) @@ -206,7 +228,11 @@ extern "C" { fflush(stdout); \ } while (0) - #define TEST_BEGIN() fiprintf( stderr, TEST_BEGIN_STRING) + #if defined(TEST_STATE_STRING) + #define TEST_BEGIN() fiprintf(stderr, TEST_BEGIN_STRING); fiprintf(stderr, TEST_STATE_STRING) + #else + #define TEST_BEGIN() fiprintf(stderr, TEST_BEGIN_STRING) + #endif #define TEST_END() fiprintf( stderr, TEST_END_STRING) |