# Copyright (c) 2021 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("//build/test.gni") module_output_path = "datamgr_service/distributeddatafwk" ############################################################################### config("module_dfx_mst_config") { visibility = [ ":*" ] include_dirs = [ "../src", "../src/fault", "../src/statistic", "../../include/log", "../../include/autils", "../../include/dfx", "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "//third_party/openssl/include/", "//foundation/distributeddatamgr/kv_store/frameworks/common", ] } ohos_unittest("DistributeddataDfxMSTTest") { module_out_path = module_output_path sources = [ "./unittest/distributeddata_dfx_mst_test.cpp" ] configs = [ ":module_dfx_mst_config" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", ] ldflags = [ "-Wl,--exclude-libs,ALL" ] deps = [ "../../dfx:distributeddata_dfx_static", "//third_party/googletest:gtest_main", "//third_party/openssl:libcrypto_shared", ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } ############################################################################### config("module_dfx_config") { visibility = [ ":*" ] include_dirs = [ "./unittest/fake/hiview/include", "./unittest/fake/hiview", "../src", "../src/fault", "../src/statistic", "../../include/log", "../../include/autils", "../../include/dfx", "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "//third_party/openssl/include/", "//foundation/distributeddatamgr/kv_store/frameworks/common", ] } ohos_unittest("DistributeddataDfxUTTest") { module_out_path = module_output_path sources = [ "../src/behaviour/behaviour_reporter_impl.cpp", "../src/fault/communication_fault_impl.cpp", "../src/fault/database_fault_impl.cpp", "../src/fault/fault_reporter.cpp", "../src/fault/runtime_fault_impl.cpp", "../src/fault/service_fault_impl.cpp", "../src/hiview_adapter.cpp", "../src/reporter.cpp", "../src/statistic/api_performance_statistic_impl.cpp", "../src/statistic/database_statistic_impl.cpp", "../src/statistic/statistic_reporter.cpp", "../src/statistic/traffic_statistic_impl.cpp", "../src/statistic/visit_statistic_impl.cpp", "./unittest/distributeddata_dfx_ut_test.cpp", "./unittest/fake/hiview/fake_hiview.cpp", ] configs = [ ":module_dfx_config" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", ] ldflags = [ "-Wl,--exclude-libs,ALL" ] deps = [ "//third_party/googletest:gtest_main", "//third_party/openssl:libcrypto_shared", ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } ############################################################################### group("unittest") { testonly = true deps = [] deps += [ ":DistributeddataDfxMSTTest", ":DistributeddataDfxUTTest", ] } ###############################################################################