1/* 2 * Copyright (C) 2023 Huawei Technologies Co., Ltd. 3 * Licensed under the Mulan PSL v2. 4 * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 * You may obtain a copy of Mulan PSL v2 at: 6 * http://license.coscl.org.cn/MulanPSL2 7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 9 * PURPOSE. 10 * See the Mulan PSL v2 for more details. 11 */ 12 13import("//test/xts/tools/build/suite.gni") 14 15hcpptest_suite("tee_test_client_api") { 16 suite_name = "acts" 17 18 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 19 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 20 sources = [ 21 tee_test_root_dir + "/utils/public_test/public_test.cpp", 22 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 23 24 tee_test_root_dir + "/ca/client_api/src/initializecontext_test.cpp", 25 tee_test_root_dir + "/ca/client_api/src/opensession_test.cpp", 26 tee_test_root_dir + "/ca/client_api/src/invokecommand_test.cpp", 27 tee_test_root_dir + "/ca/client_api/src/closesession_test.cpp", 28 tee_test_root_dir + "/ca/client_api/src/finalizecontext_test.cpp", 29 tee_test_root_dir + "/ca/client_api/src/allocatesharedmemory_test.cpp", 30 tee_test_root_dir + "/ca/client_api/src/registersharedmemory_test.cpp", 31 tee_test_root_dir + "/ca/client_api/src/releasesharedmemory_test.cpp", 32 ] 33 34 include_dirs = [ 35 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 36 "//base/tee/tee_client/interfaces/kits/c/include", 37 38 tee_test_root_dir + "/utils", 39 tee_test_root_dir + "/utils/include", 40 tee_test_root_dir + "/utils/public_test", 41 tee_test_root_dir + "/utils/cmd_id", 42 tee_test_root_dir + "/ca/client_api/common", 43 44 "//test/xts/tools/lite/hctest/include", 45 "//third_party/googletest/googletest/include", 46 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 47 ] 48 49 deps = [ 50 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 51 "//third_party/bounds_checking_function:libsec_shared", 52 ] 53 54 cflags = [ "-Wno-error" ] 55 ldflags = [ 56 "-lm", 57 "-lpthread", 58 ] 59} 60 61hcpptest_suite("tee_test_tcf_api") { 62 suite_name = "acts" 63 64 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 65 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 66 sources = [ 67 tee_test_root_dir + "/utils/public_test/public_test.cpp", 68 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 69 70 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_identity_test.cpp", 71 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_string_test.cpp", 72 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_bool_test.cpp", 73 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_u32_test.cpp", 74 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_u64_test.cpp", 75 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_binaryblock_test.cpp", 76 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_as_uuid_test.cpp", 77 tee_test_root_dir + "/ca/tcf_api/src/property/get_prop_with_enumerator_test.cpp", 78 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_malloc_test.cpp", 79 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_realloc_test.cpp", 80 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_memmove_test.cpp", 81 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_memfill_test.cpp", 82 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_free_test.cpp", 83 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_memcompare_test.cpp", 84 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_checkmemaccessrights_test.cpp", 85 tee_test_root_dir + "/ca/tcf_api/src/mem/tee_instance_test.cpp", 86 tee_test_root_dir + "/ca/tcf_api/src/other/internal_client_api_test.cpp", 87 tee_test_root_dir + "/ca/tcf_api/src/other/tee_panic_test.cpp", 88 tee_test_root_dir + "/ca/tcf_api/src/common_test.cpp", 89 ] 90 91 include_dirs = [ 92 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 93 "//base/tee/tee_client/interfaces/kits/c/include", 94 95 tee_test_root_dir + "/utils", 96 tee_test_root_dir + "/utils/include", 97 tee_test_root_dir + "/utils/public_test", 98 tee_test_root_dir + "/utils/cmd_id", 99 tee_test_root_dir + "/ca/tcf_api/common", 100 101 "//test/xts/tools/lite/hctest/include", 102 "//third_party/googletest/googletest/include", 103 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 104 ] 105 106 deps = [ 107 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 108 "//third_party/bounds_checking_function:libsec_shared", 109 ] 110 111 cflags = [ "-Wno-error" ] 112 ldflags = [ 113 "-lm", 114 "-lpthread", 115 ] 116} 117 118hcpptest_suite("tee_test_time_api") { 119 suite_name = "acts" 120 121 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 122 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 123 sources = [ 124 tee_test_root_dir + "/utils/public_test/public_test.cpp", 125 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 126 127 tee_test_root_dir + "/ca/time_api/src/tee_test_time_api.cpp", 128 ] 129 130 include_dirs = [ 131 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 132 "//base/tee/tee_client/interfaces/kits/c/include", 133 134 tee_test_root_dir + "/utils", 135 tee_test_root_dir + "/utils/include", 136 tee_test_root_dir + "/utils/public_test", 137 tee_test_root_dir + "/utils/cmd_id", 138 tee_test_root_dir + "/ca/time_api/common", 139 140 "//test/xts/tools/lite/hctest/include", 141 "//third_party/googletest/googletest/include", 142 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 143 ] 144 145 deps = [ 146 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 147 "//third_party/bounds_checking_function:libsec_shared", 148 ] 149 150 cflags = [ "-Wno-error" ] 151 ldflags = [ 152 "-lm", 153 "-lpthread", 154 ] 155} 156 157hcpptest_suite("tee_test_arithmetic_api") { 158 suite_name = "acts" 159 160 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 161 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 162 sources = [ 163 tee_test_root_dir + "/utils/public_test/public_test.cpp", 164 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 165 166 tee_test_root_dir + "/ca/arithmetic_api/src/tee_test_arithmetic_api.cpp", 167 ] 168 169 include_dirs = [ 170 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 171 "//base/tee/tee_client/interfaces/kits/c/include", 172 173 tee_test_root_dir + "/utils", 174 tee_test_root_dir + "/utils/include", 175 tee_test_root_dir + "/utils/public_test", 176 tee_test_root_dir + "/utils/cmd_id", 177 tee_test_root_dir + "/ca/arithmetic_api/common", 178 179 "//test/xts/tools/lite/hctest/include", 180 "//third_party/googletest/googletest/include", 181 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 182 ] 183 184 deps = [ 185 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 186 "//third_party/bounds_checking_function:libsec_shared", 187 ] 188 189 cflags = [ "-Wno-error" ] 190 ldflags = [ 191 "-lm", 192 "-lpthread", 193 ] 194} 195 196hcpptest_suite("tee_test_crypto_api") { 197 suite_name = "acts" 198 199 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 200 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 201 sources = [ 202 tee_test_root_dir + "/utils/public_test/public_test.cpp", 203 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 204 205 tee_test_root_dir + "/ca/crypto_api/src/tee_test_crypto_api.cpp", 206 tee_test_root_dir + "/ca/crypto_api/common/common_test.cpp", 207 ] 208 209 include_dirs = [ 210 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 211 "//base/tee/tee_client/interfaces/kits/c/include", 212 213 tee_test_root_dir + "/utils", 214 tee_test_root_dir + "/utils/include", 215 tee_test_root_dir + "/utils/public_test", 216 tee_test_root_dir + "/utils/cmd_id", 217 tee_test_root_dir + "/ca/crypto_api/common", 218 219 "//test/xts/tools/lite/hctest/include", 220 "//third_party/googletest/googletest/include", 221 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 222 ] 223 224 deps = [ 225 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 226 "//third_party/bounds_checking_function:libsec_shared", 227 ] 228 229 cflags = [ "-Wno-error" ] 230 ldflags = [ 231 "-lm", 232 "-lpthread", 233 ] 234} 235 236hcpptest_suite("tee_test_drv") { 237 suite_name = "acts" 238 239 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 240 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 241 sources = [ 242 tee_test_root_dir + "/utils/public_test/public_test.cpp", 243 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 244 tee_test_root_dir + "/ca/tee_test_drv/src/tee_test_drv.cpp", 245 ] 246 247 include_dirs = [ 248 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 249 "//base/tee/tee_client/interfaces/kits/c/include", 250 251 tee_test_root_dir + "/utils", 252 tee_test_root_dir + "/utils/include", 253 tee_test_root_dir + "/utils/public_test", 254 tee_test_root_dir + "/utils/cmd_id", 255 tee_test_root_dir + "/ca/tee_test_drv/include", 256 257 "//test/xts/tools/lite/hctest/include", 258 "//third_party/googletest/googletest/include", 259 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 260 ] 261 262 deps = [ 263 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 264 "//third_party/bounds_checking_function:libsec_shared", 265 ] 266 267 cflags = [ "-Wno-error" ] 268 ldflags = [ 269 "-lm", 270 "-lpthread", 271 ] 272} 273 274hcpptest_suite("tee_test_libc_api") { 275 suite_name = "acts" 276 277 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 278 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 279 sources = [ 280 tee_test_root_dir + "/utils/public_test/public_test.cpp", 281 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 282 tee_test_root_dir + "/ca/libc_api/src/tee_test_libc_api.cpp", 283 ] 284 285 include_dirs = [ 286 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 287 "//base/tee/tee_client/interfaces/kits/c/include", 288 289 tee_test_root_dir + "/utils", 290 tee_test_root_dir + "/utils/public_test", 291 tee_test_root_dir + "/utils/cmd_id", 292 tee_test_root_dir + "/utils/include", 293 tee_test_root_dir + "/ca/libc_api/common", 294 295 "//test/xts/tools/lite/hctest/include", 296 "//third_party/googletest/googletest/include", 297 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 298 ] 299 300 deps = [ 301 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 302 "//third_party/bounds_checking_function:libsec_shared", 303 ] 304 305 cflags = [ "-Wno-error" ] 306 ldflags = [ 307 "-lm", 308 "-lpthread", 309 ] 310} 311 312hcpptest_suite("tee_test_trusted_storage_api") { 313 suite_name = "acts" 314 315 tee_dev_kit_dir = "//base/tee/tee_dev_kit" 316 tee_test_root_dir = "//base/tee/tee_os_framework/test/xts" 317 sources = [ 318 tee_test_root_dir + "/utils/public_test/public_test.cpp", 319 tee_test_root_dir + "/utils/session_mgr/client_session_mgr.cpp", 320 tee_test_root_dir + "/ca/trusted_storage_api/src/tee_test_trusted_storage_api.cpp", 321 tee_test_root_dir + "/ca/trusted_storage_api/common/common_test.cpp", 322 ] 323 324 include_dirs = [ 325 tee_dev_kit_dir + "/sdk/thirdparty/open_source/bounds_checking_function/include/libhwsecurec", 326 "//base/tee/tee_client/interfaces/kits/c/include", 327 328 tee_test_root_dir + "/utils", 329 tee_test_root_dir + "/utils/public_test", 330 tee_test_root_dir + "/utils/cmd_id", 331 tee_test_root_dir + "/utils/include", 332 tee_test_root_dir + "/ca/trusted_storage_api/common", 333 334 "//test/xts/tools/lite/hctest/include", 335 "//third_party/googletest/googletest/include", 336 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 337 ] 338 339 deps = [ 340 "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", 341 "//third_party/bounds_checking_function:libsec_shared", 342 ] 343 344 cflags = [ "-Wno-error" ] 345 ldflags = [ 346 "-lm", 347 "-lpthread", 348 ] 349}