# 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") 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", "//third_party/googletest:gtest", "//third_party/googletest:gtest_main", ] include_dirs = [ "../src", "//third_party/googletest/googletest/include/gtest", ] cflags = [ "-Wno-inconsistent-missing-override", "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access private members ] external_deps = [ "hilog:libhilog" ] 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", ] deps = [ "//third_party/googletest:gtest" ] include_dirs = [ "//third_party/googletest/googletest/include/gtest" ] cflags = [ "-Wno-inconsistent-missing-override", "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access private members ] external_deps = [ "hilog:libhilog" ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" } group("unittest") { testonly = true deps = [ ":plugin_service_module_test", ":plugin_service_ut", ] }