Skip to content

Commit d789a7a

Browse files
committed
tests: Deduplicate test_framework using patched Unify one SiliconLabsSoftware#60
Patches from unify may land elsewhere Origin: SiliconLabsSoftware#36 Bug: SiliconLabsSoftware#55 Relate-to: SiliconLabsSoftware#46 Signed-off-by: Philippe Coval <[email protected]>
1 parent e9a4356 commit d789a7a

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ if(BUILD_TESTING)
2222
if(BUILD_TESTING_PROPERTY_DISABLED)
2323
message(WARNING "TODO: Some tests are bypassed, please help fixing them")
2424
endif()
25-
include(${CMAKE_SOURCE_DIR}/components/testframework/target_add_unittest.cmake)
25+
# Testframework deduplicated, only one to be used
26+
set(ZPC_TESTFRAMEWORK_PATH
27+
${unifysdk_SOURCE_DIR}/components/testframework
28+
)
29+
include(${ZPC_TESTFRAMEWORK_PATH}/target_add_unittest.cmake)
2630
include(cmake/include/unittest.cmake)
2731
endif()
2832

applications/zpc/CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,13 @@ include(${COMMON_PATH}/cmake/include/zap.cmake)
3333
include(${COMMON_PATH}/cmake/include/unittest.cmake)
3434
include(${COMMON_PATH}/cmake/include/version_file.cmake)
3535

36-
# Overload test system with downstream one (patched for z-wave ?)
37-
set(UNIFY-TESTFRAMEWORK_PATH
38-
${CMAKE_SOURCE_DIR}/components/testframework)
39-
message(STATUS "Using: ${UNIFY-TESTFRAMEWORK_PATH}")
40-
if(NOT EXISTS ${UNIFY-TESTFRAMEWORK_PATH})
41-
message(FATAL_ERROR "Path to unify testframework does not exist: ${UNIFY-TESTFRAMEWORK_PATH}")
36+
message(STATUS "Using: ${ZPC_TESTFRAMEWORK_PATH}")
37+
if(NOT EXISTS ${ZPC_TESTFRAMEWORK_PATH})
38+
message(FATAL_ERROR "Path to unify testframework does not exist: ${ZPC_TESTFRAMEWORK_PATH}")
4239
endif()
4340

44-
include(${UNIFY-TESTFRAMEWORK_PATH}/add_mock.cmake)
45-
include(${UNIFY-TESTFRAMEWORK_PATH}/target_add_unittest.cmake)
41+
include(${ZPC_TESTFRAMEWORK_PATH}/add_mock.cmake)
42+
include(${ZPC_TESTFRAMEWORK_PATH}/target_add_unittest.cmake)
4643

4744
include_directories(
4845
include

0 commit comments

Comments
 (0)