Index: testsuites/libtests/ChangeLog
===================================================================
--- testsuites/libtests/ChangeLog	(revision 29ab6a0ea082de76f355bd3f489fbec6f1932882)
+++ testsuites/libtests/ChangeLog	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -1,2 +1,8 @@
+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>
 
Index: testsuites/libtests/Makefile.am
===================================================================
--- testsuites/libtests/Makefile.am	(revision 29ab6a0ea082de76f355bd3f489fbec6f1932882)
+++ testsuites/libtests/Makefile.am	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -5,5 +5,5 @@
 ACLOCAL_AMFLAGS = -I ../aclocal
 
-SUBDIRS = cpuuse malloctest putenvtest monitor rtmonuse stackchk termios \
+SUBDIRS = cpuuse malloctest putenvtest monitor monitor02 rtmonuse stackchk termios \
     rtems++ tztest
 
Index: testsuites/libtests/configure.ac
===================================================================
--- testsuites/libtests/configure.ac	(revision 29ab6a0ea082de76f355bd3f489fbec6f1932882)
+++ testsuites/libtests/configure.ac	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -37,4 +37,5 @@
 malloctest/Makefile
 monitor/Makefile
+monitor02/Makefile
 putenvtest/Makefile
 rtems++/Makefile
Index: testsuites/libtests/monitor02/Makefile.am
===================================================================
--- testsuites/libtests/monitor02/Makefile.am	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
+++ testsuites/libtests/monitor02/Makefile.am	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -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
Index: testsuites/libtests/monitor02/init.c
===================================================================
--- testsuites/libtests/monitor02/init.c	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
+++ testsuites/libtests/monitor02/init.c	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -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);
+}
Index: testsuites/libtests/monitor02/monitor02.scn
===================================================================
--- testsuites/libtests/monitor02/monitor02.scn	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
+++ testsuites/libtests/monitor02/monitor02.scn	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -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 ***
Index: testsuites/libtests/monitor02/system.h
===================================================================
--- testsuites/libtests/monitor02/system.h	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
+++ testsuites/libtests/monitor02/system.h	(revision dee3992f936d95e9cc9729f669f628a36f73483d)
@@ -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 */
