From e871a956127eaea50a7767229756652a8f4f7835 Mon Sep 17 00:00:00 2001 From: jiaziyang Date: Wed, 8 Sep 2021 19:24:46 +0800 Subject: [PATCH] add the macro definition to avoid linux test error Signed-off-by: jiaziyang --- test/unittest/platform/common/uart_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unittest/platform/common/uart_test.c b/test/unittest/platform/common/uart_test.c index 7700323b3..d926be92d 100644 --- a/test/unittest/platform/common/uart_test.c +++ b/test/unittest/platform/common/uart_test.c @@ -35,10 +35,12 @@ static int32_t UartWriteTest(struct UartTest *test) static int32_t UartReadTest(struct UartTest *test) { +#ifdef __LITEOS__ if (UartSetTransMode(test->handle, UART_MODE_RD_NONBLOCK) != HDF_SUCCESS) { HDF_LOGE("%s: error", __func__); return HDF_FAILURE; - } + } +#endif if (UartRead(test->handle, test->rbuf, test->len) != 0) { HDF_LOGE("%s: error", __func__); return HDF_FAILURE; -- Gitee