source: rtems/testsuites/libtests/monitor02/init.c @ 95c1921

5
Last change on this file since 95c1921 was af43554, checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:11

tests: Remove TEST_INIT

The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.

  • 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  int                i;
39  int                argc;
40  char               *argv[MAX_ARGS];
41  char               tmp[256];
42
43  TEST_BEGIN();
44
45  for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
46    strcpy( tmp, Commands[i] );
47    if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
48      printf( "===> %s\n", Commands[i] );
49      rtems_shell_main_monitor(argc, argv);
50    }
51  }
52  TEST_END();
53  rtems_test_exit(0);
54}
Note: See TracBrowser for help on using the repository browser.