forked from Imagelibrary/rtems
2008-01-09 Jennifer Averett <jennifer.averett@OARcorp.com>
* Makefile.am, configure.ac: Added automatic test for monitor shell * monitor02/Makefile.am, monitor02/init.c, monitor02/monitor02.scn, monitor02/system.h: New files.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-01-09 Jennifer Averett <jennifer.averett@OARcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac: Added automatic test for monitor shell
|
||||
* monitor02/Makefile.am, monitor02/init.c, monitor02/monitor02.scn,
|
||||
monitor02/system.h: New files.
|
||||
|
||||
2007-12-20 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* malloctest/init.c: Add test cases suggested by Sergei Organov
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
|
||||
SUBDIRS = cpuuse malloctest putenvtest monitor rtmonuse stackchk termios \
|
||||
SUBDIRS = cpuuse malloctest putenvtest monitor monitor02 rtmonuse stackchk termios \
|
||||
rtems++ tztest
|
||||
|
||||
include $(top_srcdir)/../automake/subdirs.am
|
||||
|
||||
@@ -36,6 +36,7 @@ AC_CONFIG_FILES([Makefile
|
||||
cpuuse/Makefile
|
||||
malloctest/Makefile
|
||||
monitor/Makefile
|
||||
monitor02/Makefile
|
||||
putenvtest/Makefile
|
||||
rtems++/Makefile
|
||||
rtmonuse/Makefile
|
||||
|
||||
26
testsuites/libtests/monitor02/Makefile.am
Normal file
26
testsuites/libtests/monitor02/Makefile.am
Normal file
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = dpmem event io msg mp part region sem signal timer rate_monotonic \
|
||||
ext
|
||||
|
||||
rtems_tests_PROGRAMS = monitor02.exe
|
||||
monitor02_exe_SOURCES = init.c system.h
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
monitor02_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(monitor02_exe_OBJECTS) $(monitor02_exe_LDADD)
|
||||
LINK_LIBS = $(monitor02_exe_LDLIBS)
|
||||
|
||||
monitor02.exe$(EXEEXT): $(monitor02_exe_OBJECTS) $(monitor02_exe_DEPENDENCIES)
|
||||
@rm -f monitor02.exe$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
51
testsuites/libtests/monitor02/init.c
Normal file
51
testsuites/libtests/monitor02/init.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* This is a simple test whose only purpose is to start the Monitor
|
||||
* task. The Monitor task can be used to obtain information about
|
||||
* a variety of RTEMS objects.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
|
||||
#include <rtems/shell.h>
|
||||
#include <rtems/shellconfig.h>
|
||||
#define MAX_ARGS 128
|
||||
|
||||
char *Commands[] = {
|
||||
"task",
|
||||
"task 32",
|
||||
NULL
|
||||
};
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
uint32_t index;
|
||||
rtems_status_code status;
|
||||
int i;
|
||||
int argc;
|
||||
char *argv[MAX_ARGS];
|
||||
char tmp[256];
|
||||
|
||||
puts( "\n*** START OF MONITOR02 ***\n");
|
||||
|
||||
for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
|
||||
strcpy( tmp, Commands[i] );
|
||||
if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
|
||||
printf( "===> %s\n", Commands[i] );
|
||||
rtems_shell_main_monitor(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
puts( "\n*** END OF MONITOR02 ***\n");
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
9
testsuites/libtests/monitor02/monitor02.scn
Normal file
9
testsuites/libtests/monitor02/monitor02.scn
Normal file
@@ -0,0 +1,9 @@
|
||||
*** START OF MONITOR02 ***
|
||||
===> task
|
||||
ID NAME PRIO STAT MODES EVENTS WAITID WAITARG NOTES
|
||||
------------------------------------------------------------------------------
|
||||
0a010001 UI1 10 READY P:T:nA NONE
|
||||
===> task 32
|
||||
ID NAME PRIO STAT MODES EVENTS WAITID WAITARG NOTES
|
||||
------------------------------------------------------------------------------
|
||||
*** END OF MONITOR02 ***
|
||||
61
testsuites/libtests/monitor02/system.h
Normal file
61
testsuites/libtests/monitor02/system.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
/* types */
|
||||
|
||||
struct counters {
|
||||
uint32_t count[6];
|
||||
};
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
rtems_task Task_1_through_5(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
void Get_all_counters( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 7
|
||||
#define CONFIGURE_MAXIMUM_PERIODS 10
|
||||
|
||||
#define CONFIGURE_INIT_TASK_PRIORITY 10
|
||||
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
|
||||
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
|
||||
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS \
|
||||
(6 * (3 * RTEMS_MINIMUM_STACK_SIZE)) /* our tasks */ + \
|
||||
(1 * RTEMS_MINIMUM_STACK_SIZE) /* monitor tasks */
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
|
||||
|
||||
/* end of include file */
|
||||
Reference in New Issue
Block a user