From 7302641e45b504a631f7b5bfba33229d06abc42b Mon Sep 17 00:00:00 2001 From: cmuhammedrafi Date: Wed, 28 Aug 2024 09:23:07 +0530 Subject: [PATCH] test code --- Tests/l1networkmanager.cmake | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Tests/l1networkmanager.cmake b/Tests/l1networkmanager.cmake index c1dee422..e6d6850c 100644 --- a/Tests/l1networkmanager.cmake +++ b/Tests/l1networkmanager.cmake @@ -2,21 +2,20 @@ message("Building for unit tests...") message("Generating empty headers to suppress compiler errors") -file(GLOB BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}") -set(BASEDIR ${BASEDIR}/headers) +set(BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}/headers") set(EMPTY_HEADERS_DIRS - ${BASEDIR} - ${BASEDIR}/rdk/iarmbus - ${BASEDIR}/network - ) + ${BASEDIR} + ${BASEDIR}/rdk/iarmbus + ${BASEDIR}/network +) set(EMPTY_HEADERS - ${BASEDIR}/rdk/iarmbus/libIARM.h - ${BASEDIR}/rdk/iarmbus/libIBus.h - ${BASEDIR}/rdk/iarmbus/libIBusDaemon.h - ${BASEDIR}/network/wifiSrvMgrIarmIf.h - ${BASEDIR}/network/netsrvmgrIarm.h - ) + ${BASEDIR}/rdk/iarmbus/libIARM.h + ${BASEDIR}/rdk/iarmbus/libIBus.h + ${BASEDIR}/rdk/iarmbus/libIBusDaemon.h + ${BASEDIR}/network/wifiSrvMgrIarmIf.h + ${BASEDIR}/network/netsrvmgrIarm.h +) file(MAKE_DIRECTORY ${EMPTY_HEADERS_DIRS}) @@ -33,10 +32,10 @@ include_directories(${EMPTY_HEADERS_DIRS}) message("Adding compiler and linker options for all targets") -file(GLOB BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}/Test/mocks") +set(MOCK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mocks") set(FAKE_HEADERS - ${BASEDIR}/Iarm.h - ) + ${MOCK_DIR}/Iarm.h +) foreach (file ${FAKE_HEADERS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${file}")