Example

Dependencies:   FXAS21002 FXOS8700Q

Committer:
maygup01
Date:
Tue Nov 19 09:49:38 2019 +0000
Revision:
0:11cc2b7889af
Example

Who changed what in which revision?

UserRevisionLine numberNew contents of line
maygup01 0:11cc2b7889af 1
maygup01 0:11cc2b7889af 2 if(DEFINED DISABLE_PAL_TESTS)
maygup01 0:11cc2b7889af 3 # disabled and compiled out tests if DISABLE_PAL_TESTS variable is defined
maygup01 0:11cc2b7889af 4 return()
maygup01 0:11cc2b7889af 5 endif()
maygup01 0:11cc2b7889af 6
maygup01 0:11cc2b7889af 7 include_directories(../Source/PAL-Impl/Services-API)
maygup01 0:11cc2b7889af 8 include_directories(../Source/Port/Platform-API)
maygup01 0:11cc2b7889af 9 option(SPLIT_BINARIES "Choose whether to split the tests into 2 binaries or not" OFF)
maygup01 0:11cc2b7889af 10
maygup01 0:11cc2b7889af 11 if (${OS_BRAND} MATCHES FreeRTOS)
maygup01 0:11cc2b7889af 12 # XXX: the old version redirected UNITY_OUTPUT_CHAR() to unity_output_char(),
maygup01 0:11cc2b7889af 13 # which redirected the call to PUTCHAR() which was defined in
maygup01 0:11cc2b7889af 14 # K64F_FreeRTOS/K64F_FreeRTOS/Device/MK64F/utilities/fsl_debug_console.h
maygup01 0:11cc2b7889af 15 # and which redirected call to putchar() or DbgConsole_Putchar().
maygup01 0:11cc2b7889af 16 # The console works just fine without this so lets leave it out as no
maygup01 0:11cc2b7889af 17 # platform specific file defines it anymore.
maygup01 0:11cc2b7889af 18 # add_definitions(-DUNITY_OUTPUT_CHAR=unity_output_char)
maygup01 0:11cc2b7889af 19 endif()
maygup01 0:11cc2b7889af 20
maygup01 0:11cc2b7889af 21 add_definitions(-DRBP_TESTING)
maygup01 0:11cc2b7889af 22
maygup01 0:11cc2b7889af 23 #on Linux, we might find different names for the network interface
maygup01 0:11cc2b7889af 24 #so we have to find it, and pass to the code.
maygup01 0:11cc2b7889af 25 if (${OS_BRAND} MATCHES Linux)
maygup01 0:11cc2b7889af 26 add_definitions(-DPAL_NO_FATFS_SD_TEST=1)
maygup01 0:11cc2b7889af 27 if (NOT USE_ETH_INTERFACE)
maygup01 0:11cc2b7889af 28 execute_process(COMMAND ip -o -4 route show to default
maygup01 0:11cc2b7889af 29 COMMAND awk "{print $5}"
maygup01 0:11cc2b7889af 30 COMMAND head -1
maygup01 0:11cc2b7889af 31 OUTPUT_STRIP_TRAILING_WHITESPACE
maygup01 0:11cc2b7889af 32 OUTPUT_VARIABLE ETHNAME)
maygup01 0:11cc2b7889af 33 set(TMPD \"${ETHNAME}\")
maygup01 0:11cc2b7889af 34 add_definitions(-DPAL_LINUX_ETH=${TMPD})
maygup01 0:11cc2b7889af 35 message( "ETHNAME = ${ETHNAME}")
maygup01 0:11cc2b7889af 36 else()
maygup01 0:11cc2b7889af 37 add_definitions(-DPAL_LINUX_ETH=${USE_ETH_INTERFACE})
maygup01 0:11cc2b7889af 38 message("Using ${USE_ETH_INTERFACE} for network")
maygup01 0:11cc2b7889af 39 endif()
maygup01 0:11cc2b7889af 40 endif()
maygup01 0:11cc2b7889af 41
maygup01 0:11cc2b7889af 42 if (CMAKE_BUILD_TYPE MATCHES Debug)
maygup01 0:11cc2b7889af 43 add_definitions(-DDEBUG)
maygup01 0:11cc2b7889af 44 endif()
maygup01 0:11cc2b7889af 45
maygup01 0:11cc2b7889af 46 include_directories(Unitest)
maygup01 0:11cc2b7889af 47 include_directories(Common)
maygup01 0:11cc2b7889af 48 include_directories(Unity/src)
maygup01 0:11cc2b7889af 49 include_directories(Unity/extras/fixture/src)
maygup01 0:11cc2b7889af 50 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/PAL_Modules/)
maygup01 0:11cc2b7889af 51
maygup01 0:11cc2b7889af 52
maygup01 0:11cc2b7889af 53 set (PAL_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/PAL_Modules/)
maygup01 0:11cc2b7889af 54 set (PAL_TESTS_RUNNER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/TESTS/Unitest/)
maygup01 0:11cc2b7889af 55 set (PAL_TESTS_SOTP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/TESTS/Sotp/)
maygup01 0:11cc2b7889af 56 set (PAL_UNITY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Unity/src/)
maygup01 0:11cc2b7889af 57 set (PAL_UNITY_FIXTURE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Unity/extras/fixture/src)
maygup01 0:11cc2b7889af 58 set (PAL_TEST_BSP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Examples/PlatformBSP)
maygup01 0:11cc2b7889af 59 set (PAL_UTILS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/memoryProfiler/Other)
maygup01 0:11cc2b7889af 60
maygup01 0:11cc2b7889af 61
maygup01 0:11cc2b7889af 62 file(GLOB PAL_TEST_RTOS_SRCS "${PAL_TESTS_SOURCE_DIR}/RTOS/*.c")
maygup01 0:11cc2b7889af 63
maygup01 0:11cc2b7889af 64 file(GLOB PAL_TEST_ROT_SRCS "${PAL_TESTS_SOURCE_DIR}/ROT/*.c")
maygup01 0:11cc2b7889af 65
maygup01 0:11cc2b7889af 66 file(GLOB PAL_TEST_ENTROPY_SRCS "${PAL_TESTS_SOURCE_DIR}/Entropy/*.c")
maygup01 0:11cc2b7889af 67
maygup01 0:11cc2b7889af 68 file(GLOB PAL_TEST_SANITY_SRCS "${PAL_TESTS_SOURCE_DIR}/Sanity/*.c")
maygup01 0:11cc2b7889af 69
maygup01 0:11cc2b7889af 70 file(GLOB PAL_TEST_NETWORK_SRCS "${PAL_TESTS_SOURCE_DIR}/Networking/*.c")
maygup01 0:11cc2b7889af 71
maygup01 0:11cc2b7889af 72 file(GLOB PAL_TEST_FS_SRCS "${PAL_TESTS_SOURCE_DIR}/FileSystem/*.c")
maygup01 0:11cc2b7889af 73
maygup01 0:11cc2b7889af 74 file(GLOB PAL_TEST_SST_SRCS "${PAL_TESTS_SOURCE_DIR}/SST/*.c")
maygup01 0:11cc2b7889af 75
maygup01 0:11cc2b7889af 76 file(GLOB PAL_TEST_TIME_SRCS "${PAL_TESTS_SOURCE_DIR}/Time/*.c")
maygup01 0:11cc2b7889af 77
maygup01 0:11cc2b7889af 78 file(GLOB PAL_TEST_TLS_SRCS "${PAL_TESTS_SOURCE_DIR}/TLS/*.c")
maygup01 0:11cc2b7889af 79
maygup01 0:11cc2b7889af 80 file(GLOB_RECURSE PAL_TEST_CRYPTO_SRCS "${PAL_TESTS_SOURCE_DIR}/Crypto/*.c")
maygup01 0:11cc2b7889af 81
maygup01 0:11cc2b7889af 82 file(GLOB PAL_TEST_DRBG_SRCS "${PAL_TESTS_SOURCE_DIR}/DRBG/*")
maygup01 0:11cc2b7889af 83
maygup01 0:11cc2b7889af 84 file(GLOB PAL_TEST_UPDATE_SRCS "${PAL_TESTS_SOURCE_DIR}/Update/*")
maygup01 0:11cc2b7889af 85
maygup01 0:11cc2b7889af 86 file(GLOB PAL_TEST_FLASH_SRCS "${PAL_TESTS_SOURCE_DIR}/Storage/*.c")
maygup01 0:11cc2b7889af 87
maygup01 0:11cc2b7889af 88 file(GLOB PAL_TEST_SOTP_SRCS "${PAL_TESTS_SOURCE_DIR}/SOTP/*.c")
maygup01 0:11cc2b7889af 89
maygup01 0:11cc2b7889af 90 file(GLOB PAL_TEST_MAIN_SRCS "${PAL_TESTS_SOURCE_DIR}/*.c")
maygup01 0:11cc2b7889af 91
maygup01 0:11cc2b7889af 92
maygup01 0:11cc2b7889af 93 file(GLOB PAL_TEST_RUNNER_SANITY_SRCS "${PAL_TESTS_RUNNER_DIR}/Sanity/*.c")
maygup01 0:11cc2b7889af 94
maygup01 0:11cc2b7889af 95 file(GLOB PAL_TEST_RUNNER_RTOS_SRCS "${PAL_TESTS_RUNNER_DIR}/RTOS/*.c")
maygup01 0:11cc2b7889af 96
maygup01 0:11cc2b7889af 97 file(GLOB PAL_TEST_RUNNER_ROT_SRCS "${PAL_TESTS_RUNNER_DIR}/ROT/*.c")
maygup01 0:11cc2b7889af 98
maygup01 0:11cc2b7889af 99 file(GLOB PAL_TEST_RUNNER_ENTROPY_SRCS "${PAL_TESTS_RUNNER_DIR}/Entropy/*.c")
maygup01 0:11cc2b7889af 100
maygup01 0:11cc2b7889af 101 file(GLOB PAL_TEST_RUNNER_NETWORK_SRCS "${PAL_TESTS_RUNNER_DIR}/Networking/*.c")
maygup01 0:11cc2b7889af 102
maygup01 0:11cc2b7889af 103 file(GLOB PAL_TEST_RUNNER_FS_SRCS "${PAL_TESTS_RUNNER_DIR}/FileSystem/*.c")
maygup01 0:11cc2b7889af 104
maygup01 0:11cc2b7889af 105 file(GLOB PAL_TEST_RUNNER_SST_SRCS "${PAL_TESTS_RUNNER_DIR}/SST/*.c")
maygup01 0:11cc2b7889af 106
maygup01 0:11cc2b7889af 107 file(GLOB PAL_TEST_RUNNER_TIME_SRCS "${PAL_TESTS_RUNNER_DIR}/Time/*.c")
maygup01 0:11cc2b7889af 108
maygup01 0:11cc2b7889af 109 file(GLOB PAL_TEST_RUNNER_TLS_SRCS "${PAL_TESTS_RUNNER_DIR}/TLS/*.c")
maygup01 0:11cc2b7889af 110
maygup01 0:11cc2b7889af 111 file(GLOB PAL_TEST_RUNNER_CRYPTO_SRCS "${PAL_TESTS_RUNNER_DIR}/Crypto/*.c")
maygup01 0:11cc2b7889af 112
maygup01 0:11cc2b7889af 113 file(GLOB PAL_TEST_RUNNER_DRBG_SRCS "${PAL_TESTS_RUNNER_DIR}/DRBG/*.c")
maygup01 0:11cc2b7889af 114
maygup01 0:11cc2b7889af 115 file(GLOB PAL_TEST_RUNNER_UPDATE_SRCS "${PAL_TESTS_RUNNER_DIR}/Update/*.c")
maygup01 0:11cc2b7889af 116
maygup01 0:11cc2b7889af 117 file(GLOB PAL_TEST_RUNNER_FLASH_SRCS "${PAL_TESTS_RUNNER_DIR}/Storage/*.c")
maygup01 0:11cc2b7889af 118
maygup01 0:11cc2b7889af 119 file(GLOB PAL_TEST_RUNNER_FULL_SRCS "${PAL_TESTS_RUNNER_DIR}/Full_pal/*.c")
maygup01 0:11cc2b7889af 120
maygup01 0:11cc2b7889af 121 file(GLOB PAL_TEST_RUNNER_SOTP_SRCS "${PAL_TESTS_SOTP_DIR}/security/*.c")
maygup01 0:11cc2b7889af 122
maygup01 0:11cc2b7889af 123
maygup01 0:11cc2b7889af 124 message(PAL_TESTS_RUNNER_DIR = ${PAL_TESTS_RUNNER_DIR})
maygup01 0:11cc2b7889af 125 message(PAL_TEST_MAIN_SRCS = ${PAL_TEST_MAIN_SRCS})
maygup01 0:11cc2b7889af 126
maygup01 0:11cc2b7889af 127
maygup01 0:11cc2b7889af 128 file(GLOB PAL_TEST_BSP_SRCS "${PAL_TEST_BSP_DIR}/${PAL_TARGET_DEVICE}_${OS_BRAND}/*")
maygup01 0:11cc2b7889af 129
maygup01 0:11cc2b7889af 130 set(PAL_TEST_UNITY_SRC
maygup01 0:11cc2b7889af 131 ${PAL_UNITY_SOURCE_DIR}/unity.c
maygup01 0:11cc2b7889af 132 ${PAL_UNITY_FIXTURE_DIR}/unity_fixture.c
maygup01 0:11cc2b7889af 133 )
maygup01 0:11cc2b7889af 134
maygup01 0:11cc2b7889af 135 set(PAL_INSECURE_ROT_SRC
maygup01 0:11cc2b7889af 136 ${PAL_TEST_BSP_DIR}/pal_insecure_ROT.c
maygup01 0:11cc2b7889af 137 )
maygup01 0:11cc2b7889af 138
maygup01 0:11cc2b7889af 139 if (PAL_MEMORY_STATISTICS) #currently working only in gcc based compilers
maygup01 0:11cc2b7889af 140 list (APPEND PAL_TEST_BSP_SRCS ${PAL_UTILS_DIR}/pal_memory.c)
maygup01 0:11cc2b7889af 141 add_definitions(-DPAL_MEMORY_STATISTICS=1)
maygup01 0:11cc2b7889af 142 endif()
maygup01 0:11cc2b7889af 143
maygup01 0:11cc2b7889af 144 ADD_GLOBALDIR(${PAL_TEST_BSP_DIR}/Include/)
maygup01 0:11cc2b7889af 145 ADD_GLOBALDIR(${PAL_TESTS_SOURCE_DIR}/Includes/)
maygup01 0:11cc2b7889af 146
maygup01 0:11cc2b7889af 147 # shared source which is built to all test libraries
maygup01 0:11cc2b7889af 148 set(test_src ${PAL_TEST_MAIN_SRCS})
maygup01 0:11cc2b7889af 149
maygup01 0:11cc2b7889af 150 set (PAL_TEST_FLAGS
maygup01 0:11cc2b7889af 151 -DPAL_TEST_RTOS
maygup01 0:11cc2b7889af 152 -DPAL_TEST_ROT
maygup01 0:11cc2b7889af 153 -DPAL_TEST_ENTROPY
maygup01 0:11cc2b7889af 154 -DPAL_TEST_DRBG
maygup01 0:11cc2b7889af 155 -DPAL_TEST_FS
maygup01 0:11cc2b7889af 156 -DPAL_TEST_UPDATE
maygup01 0:11cc2b7889af 157 -DPAL_TEST_NETWORK
maygup01 0:11cc2b7889af 158 -DPAL_TEST_TLS
maygup01 0:11cc2b7889af 159 -DPAL_TEST_TIME
maygup01 0:11cc2b7889af 160 -DPAL_TEST_CRYPTO
maygup01 0:11cc2b7889af 161 -DPAL_TEST_FLASH
maygup01 0:11cc2b7889af 162 )
maygup01 0:11cc2b7889af 163
maygup01 0:11cc2b7889af 164 # Compile the PAL's fork of unity into libpalunity, so it can be compiled once
maygup01 0:11cc2b7889af 165 # and shared with all the separate test runners
maygup01 0:11cc2b7889af 166 # Note: this is not using the CREATE_LIBRARY() on purpose, as it would pollute all the
maygup01 0:11cc2b7889af 167 # executables with the library.
maygup01 0:11cc2b7889af 168 add_library(palunity STATIC ${PAL_TEST_UNITY_SRC})
maygup01 0:11cc2b7889af 169 target_compile_definitions(palunity PRIVATE ${PAL_TEST_FLAGS})
maygup01 0:11cc2b7889af 170
maygup01 0:11cc2b7889af 171 # link each test with the pal library, so it will get built as a dependency.
maygup01 0:11cc2b7889af 172
maygup01 0:11cc2b7889af 173 # Each module's test code (and its runner) is now built into its own library.
maygup01 0:11cc2b7889af 174 # Having them separate is convenient to reduce build times and especially handy
maygup01 0:11cc2b7889af 175 # when one needs to debug something, as test executable is not running or building
maygup01 0:11cc2b7889af 176 # unnecessary code.
maygup01 0:11cc2b7889af 177
maygup01 0:11cc2b7889af 178 set(sanity_test_src ${test_src}; ${PAL_TEST_RUNNER_SANITY_SRCS}; ${PAL_TEST_SANITY_SRCS})
maygup01 0:11cc2b7889af 179 CREATE_TEST_LIBRARY(sanityTests "${sanity_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 180 add_dependencies(sanityTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 181 target_link_libraries(sanityTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 182
maygup01 0:11cc2b7889af 183 set(rtos_test_src ${test_src}; ${PAL_TEST_RUNNER_RTOS_SRCS}; ${PAL_TEST_RTOS_SRCS})
maygup01 0:11cc2b7889af 184 CREATE_TEST_LIBRARY(RTOSTests "${rtos_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 185 add_dependencies(RTOSTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 186 target_link_libraries(RTOSTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 187
maygup01 0:11cc2b7889af 188 set(rot_test_src ${test_src}; ${PAL_TEST_RUNNER_ROT_SRCS}; ${PAL_TEST_ROT_SRCS})
maygup01 0:11cc2b7889af 189 CREATE_TEST_LIBRARY(ROTTests "${rot_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 190 add_dependencies(ROTTests pal palROT palunity platformCommon)
maygup01 0:11cc2b7889af 191 target_link_libraries(ROTTests pal palROT palunity platformCommon)
maygup01 0:11cc2b7889af 192
maygup01 0:11cc2b7889af 193 set(entropy_test_src ${test_src}; ${PAL_TEST_RUNNER_ENTROPY_SRCS}; ${PAL_TEST_ENTROPY_SRCS})
maygup01 0:11cc2b7889af 194 CREATE_TEST_LIBRARY(EntropyTests "${entropy_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 195 add_dependencies(EntropyTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 196 target_link_libraries(EntropyTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 197
maygup01 0:11cc2b7889af 198 set(network_test_src ${test_src}; ${PAL_TEST_RUNNER_NETWORK_SRCS}; ${PAL_TEST_NETWORK_SRCS})
maygup01 0:11cc2b7889af 199 CREATE_TEST_LIBRARY(NetworkTests "${network_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 200 add_dependencies(NetworkTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 201 target_link_libraries(NetworkTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 202
maygup01 0:11cc2b7889af 203 set(drbg_test_src ${test_src}; ${PAL_TEST_RUNNER_DRBG_SRCS}; ${PAL_TEST_DRBG_SRCS})
maygup01 0:11cc2b7889af 204 CREATE_TEST_LIBRARY(DRBGTests "${drbg_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 205 add_dependencies(DRBGTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 206 target_link_libraries(DRBGTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 207
maygup01 0:11cc2b7889af 208 set(fs_test_src ${test_src}; ${PAL_TEST_RUNNER_FS_SRCS}; ${PAL_TEST_FS_SRCS})
maygup01 0:11cc2b7889af 209 CREATE_TEST_LIBRARY(FileSystemTests "${fs_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 210 add_dependencies(FileSystemTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 211 target_link_libraries(FileSystemTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 212
maygup01 0:11cc2b7889af 213 set(sst_test_src ${test_src}; ${PAL_TEST_RUNNER_SST_SRCS}; ${PAL_TEST_SST_SRCS})
maygup01 0:11cc2b7889af 214 CREATE_TEST_LIBRARY(SSTTests "${sst_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 215 add_dependencies(SSTTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 216 target_link_libraries(SSTTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 217
maygup01 0:11cc2b7889af 218 set(time_test_src ${test_src}; ${PAL_TEST_RUNNER_TIME_SRCS}; ${PAL_TEST_TIME_SRCS})
maygup01 0:11cc2b7889af 219 CREATE_TEST_LIBRARY(TimeTests "${time_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 220 add_dependencies(TimeTests pal palunity)
maygup01 0:11cc2b7889af 221 target_link_libraries(TimeTests pal palunity)
maygup01 0:11cc2b7889af 222
maygup01 0:11cc2b7889af 223 set(tls_test_src ${test_src}; ${PAL_TEST_RUNNER_TLS_SRCS}; ${PAL_TEST_TLS_SRCS})
maygup01 0:11cc2b7889af 224 CREATE_TEST_LIBRARY(TLSTests "${tls_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 225 add_dependencies(TLSTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 226 target_link_libraries(TLSTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 227
maygup01 0:11cc2b7889af 228 set(crypto_test_src ${test_src}; ${PAL_TEST_RUNNER_CRYPTO_SRCS}; ${PAL_TEST_CRYPTO_SRCS})
maygup01 0:11cc2b7889af 229 CREATE_TEST_LIBRARY(CryptoTests "${crypto_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 230 add_dependencies(CryptoTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 231 target_link_libraries(CryptoTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 232
maygup01 0:11cc2b7889af 233 set(update_test_src ${test_src}; ${PAL_TEST_RUNNER_UPDATE_SRCS}; ${PAL_TEST_UPDATE_SRCS})
maygup01 0:11cc2b7889af 234 CREATE_TEST_LIBRARY(UpdateTests "${update_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 235 add_dependencies(UpdateTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 236 target_link_libraries(UpdateTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 237
maygup01 0:11cc2b7889af 238 set(flash_test_src ${test_src}; ${PAL_TEST_RUNNER_FLASH_SRCS}; ${PAL_TEST_FLASH_SRCS})
maygup01 0:11cc2b7889af 239 CREATE_TEST_LIBRARY(FlashTests "${flash_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 240 add_dependencies(FlashTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 241 target_link_libraries(FlashTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 242
maygup01 0:11cc2b7889af 243 set(sotp_test_src ${test_src}; ${PAL_TEST_RUNNER_SOTP_SRCS}; ${PAL_TEST_SOTP_SRCS})
maygup01 0:11cc2b7889af 244 CREATE_TEST_LIBRARY(SotpTests "${sotp_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 245 add_dependencies(SotpTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 246 target_link_libraries(SotpTests pal palunity platformCommon)
maygup01 0:11cc2b7889af 247
maygup01 0:11cc2b7889af 248 # this combines all the test libraries and calls all of their TEST_pal_<module>_GROUP_RUNNER
maygup01 0:11cc2b7889af 249 set(all_test_src ${test_src}; ${PAL_TEST_RUNNER_FULL_SRCS})
maygup01 0:11cc2b7889af 250 CREATE_TEST_LIBRARY(palTests "${all_test_src}" "${PAL_TEST_FLAGS}")
maygup01 0:11cc2b7889af 251 add_dependencies(palTests pal palunity sanityTests platformCommon)
maygup01 0:11cc2b7889af 252 target_link_libraries(palTests pal palunity platformCommon sanityTests RTOSTests ROTTests EntropyTests NetworkTests DRBGTests FileSystemTests SSTTests TimeTests TLSTests CryptoTests UpdateTests FlashTests SotpTests)
maygup01 0:11cc2b7889af 253
maygup01 0:11cc2b7889af 254