mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 09:02:20 +08:00
utest: UTEST_SERIAL_TC -> RT_UTEST_SERIAL_V2
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
@@ -5,12 +5,12 @@ menu "Serial Unit Testcases"
|
||||
default n
|
||||
depends on RT_USING_SERIAL_BYPASS
|
||||
|
||||
config UTEST_SERIAL_TC
|
||||
config RT_UTEST_SERIAL_V2
|
||||
bool "Serial V2 testcases"
|
||||
default n
|
||||
depends on RT_USING_SERIAL_V2
|
||||
|
||||
if UTEST_SERIAL_TC
|
||||
if RT_UTEST_SERIAL_V2
|
||||
|
||||
config RT_SERIAL_TC_DEVICE_NAME
|
||||
string "the device name for serial test"
|
||||
|
||||
@@ -12,7 +12,7 @@ if GetDepend(['UTEST_SERIAL_POSIX_TC']):
|
||||
if GetDepend(['UTEST_SERIAL_QEMU_TC']):
|
||||
src += Glob('qemu/*.c')
|
||||
|
||||
group = DefineGroup('utestcases', src, depend = ['UTEST_SERIAL_TC'], CPPPATH = path)
|
||||
group = DefineGroup('utestcases', src, depend = ['RT_UTEST_SERIAL_V2'], CPPPATH = path)
|
||||
|
||||
Return('group')
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static int32_t serial_fd;
|
||||
static rt_uint8_t uart_over_flag;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static int32_t serial_fd;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define UART_TEST_NUMBER 6
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
#define echo_test_buffer_size (1024)
|
||||
|
||||
static rt_device_t u1serial;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <rtdevice.h>
|
||||
#include "utest.h"
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static rt_bool_t block_read(rt_device_t uart_dev)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define UART_TEST_NUMBER 6
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static rt_bool_t block_write(rt_device_t uart_dev)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_uint8_t uart_over_flag = RT_FALSE;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <rtdevice.h>
|
||||
#include "utest.h"
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static rt_bool_t nonblock_read(rt_device_t uart_dev)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define UART_TEST_NUMBER 6
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static rt_bool_t nonblock_write(rt_device_t uart_dev)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_uint8_t uart_over_flag = RT_FALSE;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_uint8_t uart_over_flag;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_sem_t tx_sem;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_sem_t rx_sem;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_sem_t tx_sem;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
static rt_bool_t uart_result = RT_TRUE;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <rtdevice.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef UTEST_SERIAL_TC
|
||||
#ifdef RT_UTEST_SERIAL_V2
|
||||
#ifndef BSP_UART2_TX_USING_DMA
|
||||
|
||||
static struct rt_serial_device *serial;
|
||||
|
||||
Reference in New Issue
Block a user