mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 03:09:00 +08:00
tests: Move rtems_test_printer definition
Statically initialize it to use printk(). Update #3170. Update #3199.
This commit is contained in:
@@ -94,6 +94,12 @@ extern int getchark(void);
|
||||
*/
|
||||
extern int vprintk(const char *fmt, va_list ap);
|
||||
|
||||
int rtems_printk_printer(
|
||||
void *ignored,
|
||||
const char *format,
|
||||
va_list ap
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Kernel Print
|
||||
*
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <rtems/printer.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
static int printk_plugin(
|
||||
int rtems_printk_printer(
|
||||
void *ignored,
|
||||
const char *format,
|
||||
va_list ap
|
||||
@@ -37,5 +37,5 @@ void rtems_print_printer_printk(
|
||||
)
|
||||
{
|
||||
printer->context = NULL;
|
||||
printer->printer = printk_plugin;
|
||||
printer->printer = rtems_printk_printer;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
|
||||
* Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
@@ -17,6 +17,11 @@
|
||||
#endif
|
||||
|
||||
#include <rtems/test.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
rtems_printer rtems_test_printer = {
|
||||
.printer = rtems_printk_printer
|
||||
};
|
||||
|
||||
int rtems_test_begin(void)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
const char rtems_test_name[] = "CAPTURE 1";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
const char rtems_test_name[] = "COMPLEX";
|
||||
rtems_printer rtems_test_printer;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
const char rtems_test_name[] = "MATH";
|
||||
rtems_printer rtems_test_printer;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
const char rtems_test_name[] = "MATHF";
|
||||
rtems_printer rtems_test_printer;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
const char rtems_test_name[] = "MATHL";
|
||||
rtems_printer rtems_test_printer;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -29,7 +29,6 @@ rtems_task Init(rtems_task_argument argument);
|
||||
static void notification(int fd, int seconds_remaining, void *arg);
|
||||
|
||||
const char rtems_test_name[] = "CAPTURE ENGINE";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
volatile int can_proceed = 1;
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
const char rtems_test_name[] = "HELLO WORLD";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <bsp.h>
|
||||
|
||||
const char rtems_test_name[] = "LOOPBACK";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
extern int paranoia(int, char **);
|
||||
|
||||
const char rtems_test_name[] = "PARANOIA";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
char *args[2] = { "paranoia", 0 };
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "netconfig.h"
|
||||
|
||||
const char rtems_test_name[] = "PPPD";
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
static void notification(int fd, int seconds_remaining, void *arg)
|
||||
{
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
const char rtems_test_name[] = "SP 20";
|
||||
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
#define BUFFER_COUNT 20
|
||||
|
||||
#define BUFFER_SIZE 100
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
static rtems_id locked_print_semaphore; /* synchronisation semaphore */
|
||||
|
||||
rtems_printer rtems_test_printer;
|
||||
|
||||
static int locked_printf_plugin(void *context, const char *fmt, va_list ap)
|
||||
{
|
||||
(void) context;
|
||||
|
||||
Reference in New Issue
Block a user