source: rtems/testsuites/libtests/mathl/init.c @ 24d0ee57

5
Last change on this file since 24d0ee57 was 24d0ee57, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 08:39:50

cpukit, testsuite: Add rtems_printf and rtems_printer support.

This change adds rtems_printf and related functions and wraps the
RTEMS print plugin support into a user API. All references to the
plugin are removed and replaced with the rtems_printer interface.

Printk and related functions are made to return a valid number of
characters formatted and output.

The function attribute to check printf functions has been added
to rtems_printf and printk. No changes to remove warrnings are part
of this patch set.

The testsuite has been moved over to the rtems_printer. The testsuite
has a mix of rtems_printer access and direct print control via the
tmacros.h header file. The support for begink/endk has been removed
as it served no purpose and only confused the code base. The testsuite
has not been refactored to use rtems_printf. This is future work.

  • Property mode set to 100644
File size: 1.6 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#if __rtems__
26#include <bsp.h> /* for device driver prototypes */
27#include <rtems/test.h>
28
29const char rtems_test_name[] = "MATHL";
30rtems_printer rtems_test_printer;
31#endif
32
33#include <stdio.h>
34#include <stdlib.h>
35
36extern void domathl(void);
37
38#if __rtems__
39/* NOTICE: the clock driver is explicitly disabled */
40#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
41#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
42
43#define CONFIGURE_MAXIMUM_TASKS           1
44#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_FLOATING_POINT
45#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
46
47#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
48
49#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
50
51#define CONFIGURE_INIT
52#include <rtems/confdefs.h>
53
54rtems_task Init(
55  rtems_task_argument ignored
56)
57#else
58int main( void )
59#endif
60{
61#if __rtems__
62  rtems_print_printer_printf(&rtems_test_printer);
63  rtems_test_begin();
64#endif
65
66  domathl();
67
68#if __rtems__
69  rtems_test_end();
70#endif
71  exit( 0 );
72}
Note: See TracBrowser for help on using the repository browser.