tests/samples: Use <rtems/test.h>

This commit is contained in:
Sebastian Huber
2014-03-10 16:31:43 +01:00
parent 840ae715a9
commit 9391f6d663
26 changed files with 95 additions and 25 deletions

View File

@@ -14,6 +14,8 @@
#define CONFIGURE_INIT
#include "system.h"
const char rtems_test_name[] = "CLOCK TICK";
/*
* Keep the names and IDs in global variables so another task can use them.
*/
@@ -28,7 +30,7 @@ rtems_task Init(
rtems_status_code status;
rtems_time_of_day time;
puts( "\n\n*** CLOCK TICK TEST ***" );
TEST_BEGIN();
time.year = 1988;
time.month = 12;

View File

@@ -12,6 +12,7 @@
*/
#include <rtems.h>
#include <rtems/test.h>
#include <inttypes.h>
#include "tmacros.h"
@@ -48,6 +49,8 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */
#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#include <rtems/confdefs.h>
/*

View File

@@ -37,7 +37,7 @@ rtems_task Test_task(
for ( ; ; ) {
status = rtems_clock_get_tod( &time );
if ( time.second >= 35 ) {
puts( "*** END OF CLOCK TICK TEST ***" );
TEST_END();
rtems_test_exit( 0 );
}
put_name( Task_name[ task_index ], FALSE );