# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/notification/distributed_notification_service/notification.gni") import("//build/test.gni") module_output_path = "distributed_notification_service/tools" config("tools_dump_config_mock") { include_dirs = [ "//third_party/googletest/googlemock/include", "${tools_path}/test/mock", "${component_path}/services/ans/include", ] } tools_dump_mock_sources = [ "${tools_path}/test/mock/mock_ans_manager_stub.cpp" ] ohos_unittest("notification_shell_command_dump_test") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } module_out_path = module_output_path include_dirs = [] sources = [ "${tools_path}/dump/src/notification_shell_command.cpp", "${tools_path}/dump/src/shell_command.cpp", "${tools_path}/test/mock/mock_ans_notification.cpp", "notification_shell_command_dump_test.cpp", ] sources += tools_dump_mock_sources configs = [ "${tools_path}/dump:tools_dump_config", ":tools_dump_config_mock", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${frameworks_module_ans_path}:ans_innerkits", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "relational_store:native_rdb", ] } group("unittest") { testonly = true deps = [ ":notification_shell_command_dump_test" ] }