summaryrefslogtreecommitdiffstats
path: root/testsuites/samples/ticker
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 19:31:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 19:31:36 +0000
commitdfc6f3dc11e534f2e71096eea3d846f8e0e0379c (patch)
tree1a97637968d62f416a041a7fa0793332765277eb /testsuites/samples/ticker
parent2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-dfc6f3dc11e534f2e71096eea3d846f8e0e0379c.tar.bz2
2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* ticker/Makefile.am, ticker/init.c, ticker/system.h, ticker/tasks.c: Test needs clock manager. Should use rtems_test_exit() instead of exit().
Diffstat (limited to 'testsuites/samples/ticker')
-rw-r--r--testsuites/samples/ticker/Makefile.am2
-rw-r--r--testsuites/samples/ticker/init.c1
-rw-r--r--testsuites/samples/ticker/system.h7
-rw-r--r--testsuites/samples/ticker/tasks.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/testsuites/samples/ticker/Makefile.am b/testsuites/samples/ticker/Makefile.am
index b501e6ad34..8426951892 100644
--- a/testsuites/samples/ticker/Makefile.am
+++ b/testsuites/samples/ticker/Makefile.am
@@ -2,7 +2,7 @@
## $Id$
##
-MANAGERS = io
+MANAGERS = io clock
rtems_tests_PROGRAMS = ticker.exe
ticker_exe_SOURCES = init.c tasks.c system.h
diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c
index e71c05140f..1715adefc0 100644
--- a/testsuites/samples/ticker/init.c
+++ b/testsuites/samples/ticker/init.c
@@ -22,7 +22,6 @@
#define CONFIGURE_INIT
#include "system.h"
-#include <stdio.h>
/*
* Keep the names and IDs in global variables so another task can use them.
diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h
index b08e22b11a..0ae695486c 100644
--- a/testsuites/samples/ticker/system.h
+++ b/testsuites/samples/ticker/system.h
@@ -15,6 +15,7 @@
#include <rtems.h>
#include <inttypes.h>
+#include "../../support/include/buffer_test_io.h"
/* functions */
@@ -40,8 +41,11 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */
#include <bsp.h> /* for device driver prototypes */
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#if defined(CONFIGURE_INIT)
+int atexit(void (*function)(void)){}
+#endif
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
#define CONFIGURE_MAXIMUM_TASKS 4
@@ -64,7 +68,6 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */
printf( "%s%02" PRId32 ":%02" PRId32 ":%02" PRId32 " %02" PRId32 "/%02" PRId32 "/%04" PRId32 "%s", \
_s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \
(_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \
- fflush(stdout); \
} while ( 0 )
/*
diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c
index e59557ed91..d9c3791185 100644
--- a/testsuites/samples/ticker/tasks.c
+++ b/testsuites/samples/ticker/tasks.c
@@ -18,8 +18,6 @@
*/
#include "system.h"
-#include <stdio.h>
-#include <stdlib.h>
rtems_task Test_task(
rtems_task_argument unused
@@ -36,7 +34,7 @@ rtems_task Test_task(
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
if ( time.second >= 35 ) {
puts( "*** END OF CLOCK TICK TEST ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ task_index ], FALSE );
print_time( " - rtems_clock_get - ", &time, "\n" );