# 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("//base/hiviewdfx/hiview/hiview.gni") import("//build/ohos.gni") import("//build/test.gni") module_output_path = "hiviewdfx/hiview" group("moduletest") { testonly = true } group("unittest") { testonly = true deps = [ ":HiviewPlatformModuleTest", ":HolisticPlatformTest", ] } ohos_unittest("HiviewPlatformModuleTest") { module_out_path = module_output_path include_dirs = [ "moduletest/common" ] sources = [ "moduletest/common/hiview_plugin_platform_module_test.cpp" ] deps = [ "$hiview_base:hiviewbase", "//third_party/googletest:gtest_main", ] } config("HolisticPlatformTest_config") { include_dirs = [ "../", "$hiview_test/plugins/examples_bundle/bundle_event_source_example", "$hiview_test/plugins/examples/event_source_example", ] cflags_cc = [ "-D__UNITTEST__", "-D__HIVIEW_OHOS__", "-DUSE_POLL", ] } ohos_unittest("HolisticPlatformTest") { module_out_path = module_output_path configs = [ ":HolisticPlatformTest_config" ] sources = [ "unittest/common/holistic_platform_test.cpp" ] deps = [ "$hiview_base:hiviewbase", "$hiview_core:hiview_core", "$hiview_root/test/plugins/examples/dynamic_load_plugin_example:dynamicloadpluginexample", "$hiview_root/test/plugins/examples/event_processor_example1:event_processor_example1", "$hiview_root/test/plugins/examples/event_processor_example2:event_processor_example2", "$hiview_root/test/plugins/examples/event_processor_example3:event_processor_example3", "$hiview_root/test/plugins/examples/event_processor_example4:event_processor_example4", "$hiview_root/test/plugins/examples/event_processor_example5:event_processor_example5", "$hiview_root/test/plugins/examples/event_source_example:event_source_example", "$hiview_test/plugins/examples_bundle:bundleplugintest", "//third_party/googletest:gtest_main", ] resource_config_file = "$hiview_test/resource/ohos_test.xml" }