forked from Imagelibrary/rtems
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. * cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c, rtmonuse/task1.c, termios/init.c: Modified.
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
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.
|
||||
* cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c,
|
||||
rtmonuse/task1.c, termios/init.c: Modified.
|
||||
|
||||
2002-04-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove ENABLE_GCC28.
|
||||
|
||||
@@ -43,5 +43,5 @@ rtems_task Task_2(
|
||||
showTaskSwitches ();
|
||||
CPU_usage_Dump();
|
||||
puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
|
||||
exit( 0 );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ rtems_task Task_1_through_5(
|
||||
{
|
||||
if ( passes++ > NUM_PASSES ) {
|
||||
puts("*** END OF MALLOC TEST ***");
|
||||
exit(0);
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
@@ -63,7 +63,7 @@ rtems_task Task_1_through_5(
|
||||
if ( mem_ptr[i] != (mem_amt & 0xff))
|
||||
{
|
||||
printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff);
|
||||
exit(1);
|
||||
rtems_test_exit(1);
|
||||
}
|
||||
}
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
@@ -57,5 +57,5 @@ rtems_task Init(
|
||||
printf ("getenv(\"FOO\") ==> \"%s\"\n", getenv ("FOO"));
|
||||
|
||||
puts( "*** END OF PUTENV/GETENV TEST ***" );
|
||||
exit(0);
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ rtems_task Task_1_through_5(
|
||||
|
||||
if ( rmid != test_rmid ) {
|
||||
printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
|
||||
exit( 0 );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
put_name( Task_name[ argument ], FALSE );
|
||||
@@ -102,7 +102,7 @@ rtems_task Task_1_through_5(
|
||||
}
|
||||
|
||||
if ( failed == 5 )
|
||||
exit( 0 );
|
||||
rtems_test_exit( 0 );
|
||||
|
||||
pass += 1;
|
||||
|
||||
@@ -114,7 +114,7 @@ rtems_task Task_1_through_5(
|
||||
puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" );
|
||||
CPU_usage_Dump();
|
||||
Period_usage_Dump();
|
||||
exit( 0 );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ rtems_task Init (rtems_task_argument argument);
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
#if !defined(fileno)
|
||||
int fileno( FILE *stream); /* beyond ANSI */
|
||||
#endif
|
||||
@@ -589,7 +591,7 @@ void change_line_settings( struct termios *tp )
|
||||
tp->c_cflag = CLOCAL | CREAD | parity | stop_bits | data_bits | baud_rate;
|
||||
if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
|
||||
perror( "change_line_settings(): tcsetattr() failed" );
|
||||
exit( 1 );
|
||||
rtems_test_exit( 1 );
|
||||
}
|
||||
printf( "Line settings set.\n" );
|
||||
}
|
||||
@@ -606,7 +608,7 @@ void canonical_input( struct termios *tp )
|
||||
tp->c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
|
||||
if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
|
||||
perror( "canonical_input(): tcsetattr() failed" );
|
||||
exit( 1 );
|
||||
rtems_test_exit( 1 );
|
||||
}
|
||||
|
||||
while ( ( c = getchar () ) != '\n');
|
||||
@@ -725,7 +727,7 @@ Init (rtems_task_argument ignored)
|
||||
|
||||
if( tcgetattr( fileno( stdin ), &orig_termios ) < 0 ) {
|
||||
perror( "tcgetattr() failed" );
|
||||
exit( 0 );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
test_termios = orig_termios;
|
||||
@@ -738,7 +740,7 @@ Init (rtems_task_argument ignored)
|
||||
test_termios = orig_termios;
|
||||
if( tcsetattr( fileno( stdin ), TCSADRAIN, &test_termios ) < 0 ) {
|
||||
perror( "tcsetattr() failed" );
|
||||
exit( 1 );
|
||||
rtems_test_exit( 1 );
|
||||
}
|
||||
usage();
|
||||
break;
|
||||
@@ -764,7 +766,7 @@ Init (rtems_task_argument ignored)
|
||||
break;
|
||||
|
||||
case '9':
|
||||
exit( 1 );
|
||||
rtems_test_exit( 1 );
|
||||
|
||||
case '\n':
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user