1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/security/access_token/access_token.gni") 15import("//build/test.gni") 16 17config("accesstoken_test_config") { 18 include_dirs = [ 19 "//base/security/access_token/frameworks/accesstoken/include", 20 "//base/security/access_token/frameworks/common/include", 21 "//base/security/access_token/frameworks/privacy/include", 22 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 23 "//base/security/access_token/interfaces/innerkits/privacy/include", 24 "//commonlibrary/c_utils/base/include", 25 "//third_party/googletest/include", 26 "//third_party/mbedtls/include", 27 ] 28} 29 30ohos_unittest("libaccesstoken_framework_test") { 31 subsystem_name = "security" 32 part_name = "access_token" 33 module_out_path = part_name + "/" + part_name 34 35 sources = [ 36 "accesstoken_parcel_test.cpp", 37 "common_test.cpp", 38 "privacy_parcel_test.cpp", 39 ] 40 41 configs = [ 42 ":accesstoken_test_config", 43 "//base/security/access_token/config:coverage_flags", 44 ] 45 46 deps = [ 47 "//base/security/access_token/frameworks/accesstoken:accesstoken_communication_adapter_cxx", 48 "//base/security/access_token/frameworks/common:accesstoken_common_cxx", 49 "//base/security/access_token/frameworks/privacy:privacy_communication_adapter_cxx", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "ipc:ipc_single", 55 ] 56} 57 58group("unittest") { 59 testonly = true 60 deps = [ ":libaccesstoken_framework_test" ] 61} 62