# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. # 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") import("../../../base/config.gni") module_output_path = "${OHOS_PROFILER_TEST_MODULE_OUTPUT_PATH}/device" config("module_private_config") { visibility = [ ":*" ] } ohos_unittest("plugin_service_ut") { module_out_path = module_output_path sources = [ "unittest/plugin_service_test.cpp" ] public_deps = [ "${OHOS_PROFILER_DIR}/device/services/plugin_service:hiprofiler_plugin_service", "${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_source", "${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source", ] deps = [ "../../../base:hiprofiler_base" ] include_dirs = [ "../src" ] cflags = [ "-Wno-inconsistent-missing-override", "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access private members ] external_deps = [ "abseil-cpp:absl_sync", "bounds_checking_function:libsec_shared", "googletest:gtest", "hilog:libhilog_base", "openssl:libcrypto_shared", "protobuf:protobuf_lite", ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" } ohos_unittest("plugin_service_module_test") { module_out_path = module_output_path sources = [ "moduletest/plugin_service_test.cpp" ] public_deps = [ "${OHOS_PROFILER_DIR}/device/services/plugin_service:hiprofiler_plugin_service", "${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_source", "${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source", ] cflags = [ "-Wno-inconsistent-missing-override", "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access private members ] external_deps = [ "abseil-cpp:absl_sync", "googletest:gtest", "hilog:libhilog_base", "protobuf:protobuf_lite", ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" } group("unittest") { testonly = true deps = [ ":plugin_service_module_test", ":plugin_service_ut", ] }