• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13import("//base/hiviewdfx/hiview/hiview.gni")
14import("//build/ohos.gni")
15import("//build/test.gni")
16module_output_path = "hiviewdfx/hiview"
17group("moduletest") {
18  testonly = true
19}
20
21group("unittest") {
22  testonly = true
23  deps = [
24    ":HiviewPlatformModuleTest",
25    ":HolisticPlatformTest",
26  ]
27}
28
29ohos_unittest("HiviewPlatformModuleTest") {
30  module_out_path = module_output_path
31
32  include_dirs = [ "moduletest/common" ]
33
34  sources = [ "moduletest/common/hiview_plugin_platform_module_test.cpp" ]
35
36  deps = [
37    "$hiview_base:hiviewbase",
38    "//third_party/googletest:gtest_main",
39  ]
40}
41
42config("HolisticPlatformTest_config") {
43  include_dirs = [
44    "../",
45    "$hiview_test/plugins/examples_bundle/bundle_event_source_example",
46    "$hiview_test/plugins/examples/event_source_example",
47  ]
48
49  cflags_cc = [
50    "-D__UNITTEST__",
51    "-D__HIVIEW_OHOS__",
52    "-DUSE_POLL",
53  ]
54}
55
56ohos_unittest("HolisticPlatformTest") {
57  module_out_path = module_output_path
58  configs = [ ":HolisticPlatformTest_config" ]
59
60  sources = [ "unittest/common/holistic_platform_test.cpp" ]
61
62  deps = [
63    "$hiview_base:hiviewbase",
64    "$hiview_core:hiview_core",
65    "$hiview_root/test/plugins/examples/dynamic_load_plugin_example:dynamicloadpluginexample",
66    "$hiview_root/test/plugins/examples/event_processor_example1:event_processor_example1",
67    "$hiview_root/test/plugins/examples/event_processor_example2:event_processor_example2",
68    "$hiview_root/test/plugins/examples/event_processor_example3:event_processor_example3",
69    "$hiview_root/test/plugins/examples/event_processor_example4:event_processor_example4",
70    "$hiview_root/test/plugins/examples/event_processor_example5:event_processor_example5",
71    "$hiview_root/test/plugins/examples/event_source_example:event_source_example",
72    "$hiview_test/plugins/examples_bundle:bundleplugintest",
73    "//third_party/googletest:gtest_main",
74  ]
75
76  resource_config_file = "$hiview_test/resource/ohos_test.xml"
77}
78