1# Copyright (c) 2021-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/notification/common_event_service/event.gni") 15import("//build/test.gni") 16 17module_output_path = "common_event_service/frameworks/native" 18 19config("kits_natvie_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "//commonlibrary/c_utils/base/include", 24 "//utils/system/safwk/native/include", 25 ] 26 27 cflags = [] 28 29 if (target_cpu == "arm") { 30 cflags += [ "-DBINDER_IPC_32BIT" ] 31 } 32} 33 34ohos_unittest("matching_skills_test") { 35 module_out_path = module_output_path 36 37 sources = [ "matching_skills_test.cpp" ] 38 39 configs = [ ":kits_natvie_config" ] 40 41 deps = [ "${ces_native_path}:cesfwk_innerkits" ] 42 43 external_deps = [ "ability_base:want" ] 44} 45 46ohos_unittest("common_event_subscribe_test") { 47 module_out_path = module_output_path 48 49 sources = [ "common_event_subscribe_test.cpp" ] 50 51 configs = [ ":kits_natvie_config" ] 52 53 deps = [ 54 "${ces_core_path}:cesfwk_core", 55 "${ces_native_path}:cesfwk_innerkits", 56 "${services_path}:cesfwk_services", 57 ] 58 59 external_deps = [ 60 "ability_base:want", 61 "access_token:libaccesstoken_sdk", 62 "bundle_framework:appexecfwk_base", 63 "bundle_framework:appexecfwk_core", 64 "c_utils:utils", 65 "eventhandler:libeventhandler", 66 "ipc:ipc_core", 67 ] 68} 69 70ohos_unittest("common_event_unsubscribe_test") { 71 module_out_path = module_output_path 72 73 sources = [ "common_event_unsubscribe_test.cpp" ] 74 75 configs = [ ":kits_natvie_config" ] 76 77 deps = [ 78 "${ces_core_path}:cesfwk_core", 79 "${ces_native_path}:cesfwk_innerkits", 80 "${services_path}:cesfwk_services", 81 ] 82 83 external_deps = [ 84 "ability_base:want", 85 "access_token:libaccesstoken_sdk", 86 "bundle_framework:appexecfwk_base", 87 "bundle_framework:appexecfwk_core", 88 "c_utils:utils", 89 "eventhandler:libeventhandler", 90 "ipc:ipc_core", 91 ] 92} 93 94group("unittest") { 95 testonly = true 96 deps = [] 97 98 deps += [ 99 ":common_event_subscribe_test", 100 ":common_event_unsubscribe_test", 101 ":matching_skills_test", 102 ] 103} 104