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 = [ "${ffrt_path}/interfaces/kits" ] 23 24 cflags = [] 25 26 if (target_cpu == "arm") { 27 cflags += [ "-DBINDER_IPC_32BIT" ] 28 } 29} 30 31ohos_unittest("matching_skills_test") { 32 module_out_path = module_output_path 33 34 sources = [ "matching_skills_test.cpp" ] 35 36 configs = [ ":kits_natvie_config" ] 37 38 deps = [ "${ces_native_path}:cesfwk_innerkits" ] 39 40 external_deps = [ 41 "ability_base:want", 42 "c_utils:utils", 43 "eventhandler:libeventhandler", 44 "hilog:libhilog", 45 "ipc:ipc_core", 46 ] 47} 48 49ohos_unittest("common_event_subscribe_test") { 50 module_out_path = module_output_path 51 52 sources = [ "common_event_subscribe_test.cpp" ] 53 54 configs = [ ":kits_natvie_config" ] 55 56 deps = [ 57 "${ces_core_path}:cesfwk_core", 58 "${ces_native_path}:cesfwk_innerkits", 59 "${services_path}:cesfwk_services_static", 60 ] 61 62 external_deps = [ 63 "ability_base:want", 64 "access_token:libaccesstoken_sdk", 65 "bundle_framework:appexecfwk_base", 66 "bundle_framework:appexecfwk_core", 67 "c_utils:utils", 68 "eventhandler:libeventhandler", 69 "ffrt:libffrt", 70 "hilog:libhilog", 71 "init:libbegetutil", 72 "ipc:ipc_core", 73 ] 74} 75 76ohos_unittest("common_event_unsubscribe_test") { 77 module_out_path = module_output_path 78 79 sources = [ "common_event_unsubscribe_test.cpp" ] 80 81 configs = [ ":kits_natvie_config" ] 82 83 deps = [ 84 "${ces_core_path}:cesfwk_core", 85 "${ces_native_path}:cesfwk_innerkits", 86 "${services_path}:cesfwk_services_static", 87 ] 88 89 external_deps = [ 90 "ability_base:want", 91 "access_token:libaccesstoken_sdk", 92 "bundle_framework:appexecfwk_base", 93 "bundle_framework:appexecfwk_core", 94 "c_utils:utils", 95 "eventhandler:libeventhandler", 96 "ffrt:libffrt", 97 "hilog:libhilog", 98 "init:libbegetutil", 99 "ipc:ipc_core", 100 ] 101} 102 103group("unittest") { 104 testonly = true 105 deps = [] 106 107 deps += [ 108 ":common_event_subscribe_test", 109 ":common_event_unsubscribe_test", 110 ":matching_skills_test", 111 ] 112} 113