196279301Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 296279301Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 396279301Sopenharmony_ci# you may not use this file except in compliance with the License. 496279301Sopenharmony_ci# You may obtain a copy of the License at 596279301Sopenharmony_ci# 696279301Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 796279301Sopenharmony_ci# 896279301Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 996279301Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1096279301Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1196279301Sopenharmony_ci# See the License for the specific language governing permissions and 1296279301Sopenharmony_ci# limitations under the License. 1396279301Sopenharmony_ci 1496279301Sopenharmony_ciimport("//base/notification/distributed_notification_service/notification.gni") 1596279301Sopenharmony_ciimport("//build/test.gni") 1696279301Sopenharmony_ci 1796279301Sopenharmony_cimodule_output_path = "distributed_notification_service/tools" 1896279301Sopenharmony_ci 1996279301Sopenharmony_ciconfig("tools_dump_config_mock") { 2096279301Sopenharmony_ci include_dirs = [ 2196279301Sopenharmony_ci "//third_party/googletest/googlemock/include", 2296279301Sopenharmony_ci "${tools_path}/test/mock", 2396279301Sopenharmony_ci "${component_path}/services/ans/include", 2496279301Sopenharmony_ci ] 2596279301Sopenharmony_ci} 2696279301Sopenharmony_ci 2796279301Sopenharmony_citools_dump_mock_sources = 2896279301Sopenharmony_ci [ "${tools_path}/test/mock/mock_ans_manager_stub.cpp" ] 2996279301Sopenharmony_ci 3096279301Sopenharmony_ciohos_unittest("notification_shell_command_dump_test") { 3196279301Sopenharmony_ci sanitize = { 3296279301Sopenharmony_ci integer_overflow = true 3396279301Sopenharmony_ci ubsan = true 3496279301Sopenharmony_ci boundary_sanitize = true 3596279301Sopenharmony_ci cfi = true 3696279301Sopenharmony_ci cfi_cross_dso = true 3796279301Sopenharmony_ci debug = false 3896279301Sopenharmony_ci } 3996279301Sopenharmony_ci module_out_path = module_output_path 4096279301Sopenharmony_ci 4196279301Sopenharmony_ci include_dirs = [] 4296279301Sopenharmony_ci 4396279301Sopenharmony_ci sources = [ 4496279301Sopenharmony_ci "${tools_path}/dump/src/notification_shell_command.cpp", 4596279301Sopenharmony_ci "${tools_path}/dump/src/shell_command.cpp", 4696279301Sopenharmony_ci "${tools_path}/test/mock/mock_ans_notification.cpp", 4796279301Sopenharmony_ci "notification_shell_command_dump_test.cpp", 4896279301Sopenharmony_ci ] 4996279301Sopenharmony_ci sources += tools_dump_mock_sources 5096279301Sopenharmony_ci 5196279301Sopenharmony_ci configs = [ 5296279301Sopenharmony_ci "${tools_path}/dump:tools_dump_config", 5396279301Sopenharmony_ci ":tools_dump_config_mock", 5496279301Sopenharmony_ci ] 5596279301Sopenharmony_ci 5696279301Sopenharmony_ci cflags = [] 5796279301Sopenharmony_ci if (target_cpu == "arm") { 5896279301Sopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 5996279301Sopenharmony_ci } 6096279301Sopenharmony_ci 6196279301Sopenharmony_ci deps = [ 6296279301Sopenharmony_ci "${frameworks_module_ans_path}:ans_innerkits", 6396279301Sopenharmony_ci "//third_party/googletest:gmock_main", 6496279301Sopenharmony_ci "//third_party/googletest:gtest_main", 6596279301Sopenharmony_ci ] 6696279301Sopenharmony_ci 6796279301Sopenharmony_ci external_deps = [ 6896279301Sopenharmony_ci "ability_base:base", 6996279301Sopenharmony_ci "ability_base:want", 7096279301Sopenharmony_ci "ability_base:zuri", 7196279301Sopenharmony_ci "access_token:libnativetoken", 7296279301Sopenharmony_ci "access_token:libtoken_setproc", 7396279301Sopenharmony_ci "c_utils:utils", 7496279301Sopenharmony_ci "common_event_service:cesfwk_innerkits", 7596279301Sopenharmony_ci "eventhandler:libeventhandler", 7696279301Sopenharmony_ci "hilog:libhilog", 7796279301Sopenharmony_ci "ipc:ipc_core", 7896279301Sopenharmony_ci "relational_store:native_rdb", 7996279301Sopenharmony_ci ] 8096279301Sopenharmony_ci} 8196279301Sopenharmony_ci 8296279301Sopenharmony_cigroup("unittest") { 8396279301Sopenharmony_ci testonly = true 8496279301Sopenharmony_ci 8596279301Sopenharmony_ci deps = [ ":notification_shell_command_dump_test" ] 8696279301Sopenharmony_ci} 87