Changeset 28fda62 in rtems for testsuites/support


Ignore:
Timestamp:
Dec 5, 2016, 3:53:54 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
ccda60bd
Parents:
4b579c5f
git-author:
Chris Johns <chrisj@…> (12/05/16 03:53:54)
git-committer:
Chris Johns <chrisj@…> (12/07/16 06:22:41)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/support/include/buffer_test_io.h

    r4b579c5f r28fda62  
    2222
    2323/*
     24 * Test states. No state string is an expected pass.
     25 */
     26#if TEST_STATE_EXPECTED_FAIL && \
     27    TEST_INDETERMINATE_FAIL
     28  #error Test states must be unique
     29#endif
     30
     31#if TEST_STATE_EXPECTED_FAIL
     32  #define TEST_STATE_STRING "*** TEST STATE: EXPECTED-FAIL\n"
     33#elif TEST_INDETERMINATE_FAIL
     34  #define TEST_STATE_STRING "*** TEST STATE: INDETERMINATE\n"
     35#endif
     36
     37/*
    2438 *  USE PRINTK TO MINIMIZE SIZE
    2539 */
     
    5670    } while (0)
    5771
    58   #define TEST_BEGIN() printk(TEST_BEGIN_STRING)
     72  #if defined(TEST_STATE_STRING)
     73    #define TEST_BEGIN() printk(TEST_BEGIN_STRING); printk(TEST_STATE_STRING);
     74  #else
     75    #define TEST_BEGIN() printk(TEST_BEGIN_STRING)
     76  #endif
    5977
    6078  #define TEST_END() printk(TEST_END_STRING)
     
    158176    } while (0)
    159177
    160   #define TEST_BEGIN() printf(TEST_BEGIN_STRING)
     178  #if defined(TEST_STATE_STRING)
     179    #define TEST_BEGIN() printf(TEST_BEGIN_STRING); printf(TEST_STATE_STRING)
     180  #else
     181    #define TEST_BEGIN() printf(TEST_BEGIN_STRING)
     182  #endif
    161183
    162184  #define TEST_END() printf(TEST_END_STRING)
     
    207229    } while (0)
    208230
    209   #define TEST_BEGIN() fiprintf( stderr, TEST_BEGIN_STRING)
     231  #if defined(TEST_STATE_STRING)
     232    #define TEST_BEGIN() fiprintf(stderr, TEST_BEGIN_STRING); fiprintf(stderr, TEST_STATE_STRING)
     233  #else
     234    #define TEST_BEGIN() fiprintf(stderr, TEST_BEGIN_STRING)
     235  #endif
    210236
    211237  #define TEST_END()  fiprintf( stderr, TEST_END_STRING)
Note: See TracChangeset for help on using the changeset viewer.