summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-09 19:01:28 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-09 19:01:28 +0000
commitdee3992f936d95e9cc9729f669f628a36f73483d (patch)
tree1f4a368a23fd80222966c741d3156fbf7a10f8a3 /testsuites/libtests
parent2008-01-09 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-dee3992f936d95e9cc9729f669f628a36f73483d.tar.bz2
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.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r--testsuites/libtests/ChangeLog6
-rw-r--r--testsuites/libtests/Makefile.am2
-rw-r--r--testsuites/libtests/configure.ac1
-rw-r--r--testsuites/libtests/monitor02/Makefile.am26
-rw-r--r--testsuites/libtests/monitor02/init.c51
-rw-r--r--testsuites/libtests/monitor02/monitor02.scn9
-rw-r--r--testsuites/libtests/monitor02/system.h61
7 files changed, 155 insertions, 1 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog
index 26a8259820..f66f9eb50a 100644
--- a/testsuites/libtests/ChangeLog
+++ b/testsuites/libtests/ChangeLog
@@ -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
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 3c9ceaee99..e74bdafd59 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -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
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index 4d52aa43a2..145ffb4e65 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -36,6 +36,7 @@ AC_CONFIG_FILES([Makefile
cpuuse/Makefile
malloctest/Makefile
monitor/Makefile
+monitor02/Makefile
putenvtest/Makefile
rtems++/Makefile
rtmonuse/Makefile
diff --git a/testsuites/libtests/monitor02/Makefile.am b/testsuites/libtests/monitor02/Makefile.am
new file mode 100644
index 0000000000..fa89b64520
--- /dev/null
+++ b/testsuites/libtests/monitor02/Makefile.am
@@ -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
diff --git a/testsuites/libtests/monitor02/init.c b/testsuites/libtests/monitor02/init.c
new file mode 100644
index 0000000000..50c73f93d3
--- /dev/null
+++ b/testsuites/libtests/monitor02/init.c
@@ -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);
+}
diff --git a/testsuites/libtests/monitor02/monitor02.scn b/testsuites/libtests/monitor02/monitor02.scn
new file mode 100644
index 0000000000..94b30b7938
--- /dev/null
+++ b/testsuites/libtests/monitor02/monitor02.scn
@@ -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 ***
diff --git a/testsuites/libtests/monitor02/system.h b/testsuites/libtests/monitor02/system.h
new file mode 100644
index 0000000000..924b1f8322
--- /dev/null
+++ b/testsuites/libtests/monitor02/system.h
@@ -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 */