source: rtems/testsuites/libtests/math/init.c @ c4b8b147

5
Last change on this file since c4b8b147 was c4b8b147, checked in by Sebastian Huber <sebastian.huber@…>, on 11/03/17 at 07:35:38

tests: Use simple console driver

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *  It is called from init_exec and has the responsibility for creating
5 *  and starting the tasks that make up the test.  If the time of day
6 *  clock is required for the test, it should also be set to a known
7 *  value by this function.
8 *
9 *  Input parameters:  NONE
10 *
11 *  Output parameters:  NONE
12 *
13 *  COPYRIGHT (c) 1989-1999.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 */
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25/*
26 * @fixme This test should use the test macros but the include paths are
27 *        are wrong in the build system.
28 */
29#if __rtems__
30#include <bsp.h> /* for device driver prototypes */
31#include <rtems/test.h>
32
33const char rtems_test_name[] = "MATH";
34#endif
35
36#include <stdio.h>
37#include <stdlib.h>
38
39extern void domath(void);
40
41#if __rtems__
42/* NOTICE: the clock driver is explicitly disabled */
43#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
44#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
45
46#define CONFIGURE_MAXIMUM_TASKS           1
47#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_FLOATING_POINT
48
49#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
50
51#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
52
53#define CONFIGURE_INIT
54#include <rtems/confdefs.h>
55
56rtems_task Init(
57  rtems_task_argument ignored
58)
59#else
60int main( void )
61#endif
62{
63#if __rtems__
64  rtems_print_printer_fprintf_putc(&rtems_test_printer);
65  rtems_test_begin();
66#endif
67
68  domath();
69
70#if __rtems__
71  rtems_test_end();
72#endif
73  exit( 0 );
74}
Note: See TracBrowser for help on using the repository browser.