From 04f432b59cf6735ee0f37d9fa3898b3bd9f32000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=A7=91=E5=87=80?= Date: Tue, 14 Sep 2021 20:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90communication=5Flite=E3=80=91=E3=80=90?= =?UTF-8?q?master=E3=80=91add=20lwip=20suites=20to=20linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王科净 --- build_lite/BUILD.gn | 1 + communication_lite/lwip_posix/BUILD.gn | 6 ++++++ communication_lite/lwip_posix/src/ActsLwipTest.cpp | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index beaf6e912..ddd8987c7 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -95,6 +95,7 @@ lite_component("acts_component") { "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest", "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest", "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest", + "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest", ] } } diff --git a/communication_lite/lwip_posix/BUILD.gn b/communication_lite/lwip_posix/BUILD.gn index b2cdd0941..bbbcef843 100755 --- a/communication_lite/lwip_posix/BUILD.gn +++ b/communication_lite/lwip_posix/BUILD.gn @@ -25,4 +25,10 @@ hcpptest_suite("ActsLwipTest") { deps = ["//third_party/bounds_checking_function:libsec_shared" ] cflags = [ "-Wno-error" ] + + ldflags = [ + "-lstdc++", + "-lm", + "-lpthread", + ] } diff --git a/communication_lite/lwip_posix/src/ActsLwipTest.cpp b/communication_lite/lwip_posix/src/ActsLwipTest.cpp index 288deb26a..ca6d2019e 100755 --- a/communication_lite/lwip_posix/src/ActsLwipTest.cpp +++ b/communication_lite/lwip_posix/src/ActsLwipTest.cpp @@ -413,7 +413,8 @@ static int SelectServerForFork(unsigned int timeoutSec) char dataBuf[50] = {0}; int fds[TEST_FD_COUNT] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; fds[0] = srvFd; - struct timeval timev = {.tv_sec = timeoutSec, .tv_usec = 0}; + long timeout = timeoutSec; + struct timeval timev = {.tv_sec = timeout, .tv_usec = 0}; struct sockaddr_in clnAddr = {0}; socklen_t clnAddrLen = sizeof(clnAddr); while (1) { -- GitLab