Changeset bcd0c06c in rtems for testsuites/support


Ignore:
Timestamp:
Nov 7, 2017, 9:25:36 PM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
e6df806
Parents:
a6bf052
git-author:
Chris Johns <chrisj@…> (11/07/17 21:25:36)
git-committer:
Chris Johns <chrisj@…> (11/11/17 05:14:59)
Message:

tests: Use rtems_test_begin and rtems_test_end.

Add a tests enum and move all test banner test to the library in libmisc.

Update #3199.

File:
1 edited

Legend:

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

    ra6bf052 rbcd0c06c  
    1010#ifdef __cplusplus
    1111extern "C" {
    12 #endif
    13 
    14 /*
    15  * Test states. No state string is an expected pass.
    16  */
    17 #if (TEST_STATE_EXPECTED_FAIL && TEST_STATE_USER_INPUT) || \
    18     (TEST_STATE_EXPECTED_FAIL && TEST_STATE_INDETERMINATE) || \
    19     (TEST_STATE_EXPECTED_FAIL && TEST_STATE_BENCHMARK) || \
    20     (TEST_STATE_USER_INPUT    && TEST_STATE_INDETERMINATE) || \
    21     (TEST_STATE_USER_INPUT    && TEST_STATE_BENCHMARK) || \
    22     (TEST_STATE_INDETERMINATE && TEST_STATE_BENCHMARK)
    23   #error Test states must be unique
    24 #endif
    25 
    26 #if TEST_STATE_EXPECTED_FAIL
    27   #define TEST_STATE_STRING "*** TEST STATE: EXPECTED-FAIL\n"
    28 #elif TEST_STATE_USER_INPUT
    29   #define TEST_STATE_STRING "*** TEST STATE: USER_INPUT\n"
    30 #elif TEST_STATE_INDETERMINATE
    31   #define TEST_STATE_STRING "*** TEST STATE: INDETERMINATE\n"
    32 #elif TEST_STATE_BENCHMARK
    33   #define TEST_STATE_STRING "*** TEST STATE: BENCHMARK\n"
    3412#endif
    3513
     
    6240  } while (0)
    6341
    64 #if defined(TEST_STATE_STRING)
    65   #define TEST_BEGIN() \
    66   do { \
    67     rtems_printf( &rtems_test_printer, "\n"); \
    68     rtems_printf( &rtems_test_printer, TEST_BEGIN_STRING ); \
    69     rtems_printf( &rtems_test_printer, TEST_STATE_STRING ); \
    70   } while (0)
    71 #else
    72   #define TEST_BEGIN() \
    73   do { \
    74     rtems_printf( &rtems_test_printer, "\n" ); \
    75     rtems_printf( &rtems_test_printer, TEST_BEGIN_STRING ); \
    76   } while (0)
    77 #endif
    78 
    79 #define TEST_END() \
    80   do { \
    81      rtems_printf( &rtems_test_printer, "\n" ); \
    82      rtems_printf( &rtems_test_printer, TEST_END_STRING ); \
    83      rtems_printf( &rtems_test_printer, "\n" ); \
    84   } while (0)
     42#define TEST_BEGIN() rtems_test_begin(rtems_test_name, TEST_STATE)
     43#define TEST_END()   rtems_test_end(rtems_test_name)
    8544
    8645#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.