source: rtems/testsuites/libtests/monitor02/init.c @ c499856

4.11
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This is a simple test whose only purpose is to start the Monitor
3 *  task.  The Monitor task can be used to obtain information about
4 *  a variety of RTEMS objects.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#ifdef HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#define CONFIGURE_INIT
19#include "bsp.h"
20#include "system.h"
21
22#include <rtems/shell.h>
23#include <rtems/shellconfig.h>
24
25const char rtems_test_name[] = "MONITOR 2";
26
27#define MAX_ARGS 128
28
29char        *Commands[] = {
30  "task",
31  "task 32",
32  NULL
33};
34rtems_task Init(
35  rtems_task_argument argument
36)
37{
38#if !BSP_SMALL_MEMORY
39  int                i;
40  int                argc;
41  char               *argv[MAX_ARGS];
42  char               tmp[256];
43
44  TEST_BEGIN();
45
46  for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
47    strcpy( tmp, Commands[i] );
48    if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
49      printf( "===> %s\n", Commands[i] );
50      rtems_shell_main_monitor(argc, argv);
51    }
52  }
53  TEST_END();
54#else
55  puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
56#endif
57  rtems_test_exit(0);
58}
Note: See TracBrowser for help on using the repository browser.