1# Copyright (c) 2021 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/common_event_service/tools" 18 19config("tools_cem_test_config") { 20 include_dirs = [ "${tools_path}/cem/include" ] 21} 22 23ohos_systemtest("common_event_command_dump_system_test") { 24 module_out_path = module_output_path 25 26 sources = [ "common_event_command_dump_system_test.cpp" ] 27 28 configs = [ ":tools_cem_test_config" ] 29 30 cflags = [] 31 if (target_cpu == "arm") { 32 cflags += [ "-DBINDER_IPC_32BIT" ] 33 } 34 defines = [] 35 if (build_variant == "user") { 36 defines += [ "CEM_BUILD_VARIANT_USER" ] 37 } 38 deps = [ 39 "${ces_core_path}:cesfwk_core", 40 "${ces_native_path}:cesfwk_innerkits", 41 ] 42 43 external_deps = [ 44 "ability_base:want", 45 "bundle_framework:appexecfwk_core", 46 "c_utils:utils", 47 "eventhandler:libeventhandler", 48 "ffrt:libffrt", 49 "googletest:gtest_main", 50 "hilog:libhilog", 51 "ipc:ipc_core", 52 ] 53} 54 55ohos_systemtest("common_event_command_publish_system_test") { 56 sanitize = { 57 integer_overflow = true 58 ubsan = true 59 boundary_sanitize = true 60 cfi = true 61 cfi_cross_dso = true 62 debug = false 63 } 64 module_out_path = module_output_path 65 66 sources = [ "common_event_command_publish_system_test.cpp" ] 67 68 configs = [ ":tools_cem_test_config" ] 69 70 cflags = [] 71 if (target_cpu == "arm") { 72 cflags += [ "-DBINDER_IPC_32BIT" ] 73 } 74 75 deps = [ 76 "${ces_core_path}:cesfwk_core", 77 "${ces_native_path}:cesfwk_innerkits", 78 ] 79 80 external_deps = [ 81 "ability_base:want", 82 "access_token:libnativetoken", 83 "access_token:libtoken_setproc", 84 "bundle_framework:appexecfwk_core", 85 "cJSON:cjson_static", 86 "c_utils:utils", 87 "eventhandler:libeventhandler", 88 "ffrt:libffrt", 89 "googletest:gtest_main", 90 "hilog:libhilog", 91 "ipc:ipc_core", 92 "selinux_adapter:librestorecon", 93 ] 94} 95 96group("systemtest") { 97 testonly = true 98 99 deps = [ 100 ":common_event_command_dump_system_test", 101 ":common_event_command_publish_system_test", 102 ] 103} 104