• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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.
13
14import("//base/startup/appspawn/appspawn.gni")
15import("//build/test.gni")
16
17ohos_executable("AppSpawnTest") {
18  sources = [
19    "${appspawn_path}/test/moduletest/appspawn_test_cmder.cpp",
20    "${appspawn_path}/test/moduletest/appspawn_test_main.cpp",
21  ]
22
23  include_dirs = [
24    "${appspawn_path}",
25    "${appspawn_path}/common",
26    "${appspawn_path}/standard",
27    "${appspawn_path}/modules/modulemgr",
28    "${appspawn_path}/modules/ace_adapter",
29    "${appspawn_path}/modules/common",
30    "${appspawn_path}/modules/sandbox",
31    "${appspawn_path}/test/moduletest/threadpool",
32    "${appspawn_innerkits_path}/include",
33    "${appspawn_innerkits_path}/client",
34    "${appspawn_innerkits_path}/permission",
35    "${appspawn_path}/modules/module_engine/include",
36    "${appspawn_path}/test/mock",
37    "${appspawn_path}/test/unittest",
38    "${appspawn_path}/util/include",
39  ]
40
41  deps = [
42    "${appspawn_innerkits_path}/client:appspawn_client",
43    "${appspawn_path}/test/moduletest/threadpool:libappspawn_threadpool",
44    "${appspawn_path}/util:libappspawn_util",
45  ]
46
47  external_deps = [
48    "cJSON:cjson",
49    "c_utils:utils",
50    "config_policy:configpolicy_util",
51    "hilog:libhilog",
52    "init:libbegetutil",
53    "zlib:libz",
54  ]
55  subsystem_name = "${subsystem_name}"
56  part_name = "${part_name}"
57}
58
59ohos_moduletest("AppSpawnModuleTest") {
60  module_out_path = "${module_output_path}"
61
62  sources = [
63    "${appspawn_path}/test/moduletest/appspawn_client_test.cpp",
64    "${appspawn_path}/test/moduletest/appspawn_module_test.cpp",
65    "${appspawn_path}/test/moduletest/appspawn_test_cmder.cpp",
66  ]
67
68  include_dirs = [
69    "${appspawn_path}",
70    "${appspawn_path}/common",
71    "${appspawn_path}/standard",
72    "${appspawn_path}/modules/modulemgr",
73    "${appspawn_path}/modules/ace_adapter",
74    "${appspawn_path}/modules/common",
75    "${appspawn_path}/modules/sandbox",
76    "${appspawn_path}/test/moduletest/threadpool",
77    "${appspawn_innerkits_path}/include",
78    "${appspawn_innerkits_path}/client",
79    "${appspawn_innerkits_path}/permission",
80    "${appspawn_path}/modules/module_engine/include",
81    "${appspawn_path}/test/mock",
82    "${appspawn_path}/test/unittest",
83    "${appspawn_path}/util/include",
84  ]
85
86  deps = [
87    "${appspawn_innerkits_path}/client:appspawn_client",
88    "${appspawn_path}/util:libappspawn_util",
89    "//third_party/googletest:gtest_main",
90  ]
91
92  external_deps = [
93    "cJSON:cjson",
94    "c_utils:utils",
95    "config_policy:configpolicy_util",
96    "hilog:libhilog",
97    "init:libbegetutil",
98  ]
99  subsystem_name = "${subsystem_name}"
100  part_name = "${part_name}"
101}
102
103group("moduletest") {
104  testonly = true
105  deps = [
106    ":AppSpawnModuleTest",
107    ":AppSpawnTest",
108    "plugin-sample:appspawn_plugin_sample",
109  ]
110  deps += [ "hnp_sample:hnpsample" ]
111}
112