source: rtems/cpukit/libtest/testwrappers.c @ 9de8d61

Last change on this file since 9de8d61 was 9de8d61, checked in by Sebastian Huber <sebastian.huber@…>, on 07/17/20 at 11:36:49

libtest: <rtems/test.h> to <rtems/test-info.h>

Rename this header file to later move <t.h> to <rtems/test.h>. The main
feature provided by <rtems/test-info.h> is the output of standard test
information which is consumed by the RTEMS Tester.

Update #3199.

  • Property mode set to 100644
File size: 787 bytes
Line 
1/*
2 * Copyright (c) 2017 Chris Johns <chrisj@rtems.org>. All rights reserved.
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
8
9#ifdef HAVE_CONFIG_H
10#include "config.h"
11#endif
12
13#include <rtems/test-info.h>
14
15int __wrap_printf(const char* format, ...);
16int __wrap_puts(const char *str);
17int __wrap_putchar(int c);
18
19int __wrap_printf(
20 const char* format,
21  ...
22)
23{
24  va_list ap;
25  int len;
26  va_start(ap, format);
27  len = rtems_vprintf(
28    &rtems_test_printer,
29    format,
30    ap
31  );
32  va_end(ap);
33  return len;
34}
35
36int __wrap_puts(
37  const char *str
38)
39{
40  return rtems_test_printf( "%s\n", str );
41}
42
43int __wrap_putchar(
44  int c
45)
46{
47  return rtems_test_printf( "%c", c );
48}
Note: See TracBrowser for help on using the repository browser.