diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index 76341c536f6954641e202f02738dd5a64d1abee0..a3878cc33472978f33ac230a054a33d0109b4ba8 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -79,6 +79,8 @@ lite_component("acts_component") { "//test/xts/acts/utils_lite/kv_store_posix:ActsKvStoreTest", "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest", "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest", + "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest", + "//test/xts/acts/security_lite/datahuks_posix:ActsSecurityDataTest", #"//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest", #"//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest", diff --git a/communication_lite/lwip_posix/BUILD.gn b/communication_lite/lwip_posix/BUILD.gn index b2cdd09419168e6a6e7e0773d8bcc6596659addf..540e23936f962b76e411aee78ed4d936c2af2674 100755 --- a/communication_lite/lwip_posix/BUILD.gn +++ b/communication_lite/lwip_posix/BUILD.gn @@ -22,7 +22,13 @@ hcpptest_suite("ActsLwipTest") { "restrict=", ] - deps = ["//third_party/bounds_checking_function:libsec_shared" ] + 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 6c625b6725fd2a223558775077840bb52dc819a6..e0e817098fa37088844c9f89d845daa84287e3bc 100755 --- a/communication_lite/lwip_posix/src/ActsLwipTest.cpp +++ b/communication_lite/lwip_posix/src/ActsLwipTest.cpp @@ -14,14 +14,14 @@ */ #include "gtest/gtest.h" -#include "sys/socket.h" -#include "arpa/inet.h" -#include "netinet/tcp.h" -#include "securec.h" +#include +#include +#include #include #include #include #include +#include "securec.h" using namespace std; using namespace testing::ext; @@ -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 = static_cast(timeoutSec); + struct timeval timev = {.tv_sec = timeout, .tv_usec = 0}; struct sockaddr_in clnAddr = {0}; socklen_t clnAddrLen = sizeof(clnAddr); while (1) {