diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-08-02 00:53:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-08-02 00:53:21 +0000 |
commit | d8024895e30c6ad773bda91d5bc4038db675b033 (patch) | |
tree | 133f7e9a783f06610f87bdde59ccd5ae0ecfdd65 /testsuites/psxtests/include | |
parent | 2002-08-01 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-d8024895e30c6ad773bda91d5bc4038db675b033.tar.bz2 |
2002-08-01 Joel Sherrill <joel@OARcorp.com>
* Per PR47 add support for buffered test output. This involved
adding defines to redirect output to a buffer and dump it when
full, at "test pause", and at exit. To avoid problems when redefining
exit(), all tests were modified to call rtems_test_exit().
Some tests, notable psxtests, had to be modified to include
the standard test macro .h file (pmacros.h or tmacros.h) to
enable this support.
* include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c,
psx03/init.c, psx04/init.c, psx05/init.c, psx06/init.c, psx07/init.c,
psx08/task3.c, psx09/init.c, psx10/init.c, psx11/init.c,
psx12/init.c, psx13/Makefile.am, psx13/main.c, psx13/test.c,
psxcancel/init.c, psxchroot01/Makefile.am, psxchroot01/main.c,
psxchroot01/test.c, psxfile01/Makefile.am, psxfile01/main.c,
psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c,
psxfile01/test_write.c, psxmount/Makefile.am, psxmount/main.c,
psxmount/test.c, psxmsgq01/init.c, psxreaddir/Makefile.am,
psxreaddir/main.c, psxreaddir/test.c, psxsem01/init.c,
psxstat/Makefile.am, psxstat/main.c, psxstat/test.c, psxtime/main.c,
psxtime/test.c, psxtimer/psxtimer.c: Modified.
Diffstat (limited to 'testsuites/psxtests/include')
-rw-r--r-- | testsuites/psxtests/include/pmacros.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h index 38d0ee1904..0338038d51 100644 --- a/testsuites/psxtests/include/pmacros.h +++ b/testsuites/psxtests/include/pmacros.h @@ -13,6 +13,8 @@ #include <time.h> #include <unistd.h> +#include <buffer_test_io.h> + /* * These help manipulate the "struct tm" form of time */ @@ -67,16 +69,16 @@ #define print_current_time(s1, s2) \ do { \ - char _buffer[32]; \ + char _time_buffer[32]; \ int _status; \ struct timespec _tv; \ \ _status = clock_gettime( CLOCK_REALTIME, &_tv ); \ assert( !_status ); \ \ - (void) ctime_r( &_tv.tv_sec, _buffer ); \ - _buffer[ strlen( _buffer ) - 1 ] = 0; \ - printf( "%s%s%s\n", s1, _buffer, s2 ); \ + (void) ctime_r( &_tv.tv_sec, _time_buffer ); \ + _time_buffer[ strlen( _time_buffer ) - 1 ] = 0; \ + printf( "%s%s%s\n", s1, _time_buffer, s2 ); \ fflush(stdout); \ } while ( 0 ) |