# Copyright (c) 2021-2024 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/hiviewdfx/hiview/hiview.gni") import("//build/test.gni") module_output_path = "hiview/base/event_export" group("unittest") { testonly = true deps = [ ":EventExportConfigTest", ":EventExportDbMgrTest", ":EventExportMgrTest", ] } config("event_export_config_test_config") { visibility = [ ":*" ] include_dirs = [ "unittest/common" ] cflags = [] } ohos_unittest("EventExportConfigTest") { module_out_path = module_output_path configs = [ ":event_export_config_test_config" ] sources = [ "unittest/common/event_export_config_test.cpp" ] deps = [ "$hiview_base:hiviewbase_static_lib_for_tdd", "../../event_export:event_export_engine", ] external_deps = [ "cJSON:cjson", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", ] resource_config_file = "resource/ohos_test.xml" } config("event_db_mgr_test_config") { visibility = [ ":*" ] include_dirs = [ "unittest/common" ] cflags = [] } ohos_unittest("EventExportDbMgrTest") { module_out_path = module_output_path configs = [ ":event_db_mgr_test_config" ] sources = [ "unittest/common/event_export_db_mgr_test.cpp" ] deps = [ "$hiview_base:hiviewbase_static_lib_for_tdd", "../../event_export:event_export_engine", ] external_deps = [ "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", "relational_store:native_rdb", ] } config("event_export_mgr_test_config") { visibility = [ ":*" ] include_dirs = [ "unittest/common" ] cflags = [] } ohos_unittest("EventExportMgrTest") { module_out_path = module_output_path configs = [ ":event_export_mgr_test_config" ] sources = [ "unittest/common/event_export_mgr_test.cpp" ] deps = [ "$hiview_base:hiviewbase", "../../event_export:event_export_engine", ] external_deps = [ "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:dataobs_manager", "cJSON:cjson", "data_share:datashare_common", "data_share:datashare_consumer", "googletest:gmock", "googletest:gtest_main", "hilog:libhilog", "ipc:ipc_core", "relational_store:native_rdb", ] }