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