BUILD.gn 2.4 KB
Newer Older
X
xionglei6 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
# Copyright (c) 2020-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.

M
init  
Mupceet 已提交
14
import("//base/startup/init/begetd.gni")
X
xionglei6 已提交
15
import("//build/ohos.gni")
16
import("//build/test.gni")
X
xionglei6 已提交
17

18 19
ohos_shared_library("libparamtestmodule") {
  sources = [ "param_test_module.c" ]
X
xionglei6 已提交
20 21

  include_dirs = [
M
init  
Mupceet 已提交
22 23 24 25 26 27 28
    "//base/startup/init/services/include/param",
    "//base/startup/init/services/include",
    "//base/startup/init/services/init/include",
    "//base/startup/init/services/log",
    "//base/startup/init/interfaces/innerkits/include",
    "//base/startup/init/services/loopevent/include",
    "//base/startup/init/ueventd/include",
X
xionglei6 已提交
29 30 31 32 33
    "//third_party/cJSON",
    "//third_party/bounds_checking_function/include",
  ]

  deps = [
M
init  
Mupceet 已提交
34 35
    "//base/startup/init/interfaces/innerkits:libbegetutil",
    "//base/startup/init/services/log:agent_log",
M
Mupceet 已提交
36
    "//third_party/bounds_checking_function:libsec_shared",
X
xionglei6 已提交
37
  ]
H
handyohos 已提交
38

39
  external_deps = [ "init:libinit_module_engine" ]
H
handyohos 已提交
40

X
xionglei6 已提交
41
  part_name = "init"
42
  subsystem_name = "startup"
43
  module_install_dir = "lib/init"
X
xionglei6 已提交
44 45
}

46 47 48 49 50 51
ohos_moduletest("InitModuleTest") {
  module_out_path = "startup/init"

  sources = [
    "hookmgr_moduletest.cpp",
    "modulemgr_moduletest.cpp",
C
cheng_jinsong 已提交
52
    "service_control_test.cpp",
C
chengjinsong2 已提交
53
    "service_watcher_moduleTest.cpp",
C
chengjinsong2 已提交
54
    "syspara_moduleTest.cpp",
C
cheng_jinsong 已提交
55
    "test_utils.cpp",
56 57
  ]

C
chengjinsong2 已提交
58 59 60 61 62
  include_dirs = [
    "//base/startup/init/interfaces/innerkits/include",
    "//base/startup/init/interfaces/innerkits/include/syspara",
    "//base/startup/init/interfaces/innerkits/syspara",
    "//base/startup/init/services/include/param",
63
    ".",
C
chengjinsong2 已提交
64
  ]
65 66

  deps = [
C
chengjinsong2 已提交
67
    "//base/startup/init/interfaces/innerkits:libbeget_proxy",
68
    "//base/startup/init/interfaces/innerkits:libbegetutil",
C
chengjinsong2 已提交
69
    "//third_party/bounds_checking_function:libsec_shared",
70 71 72 73 74 75 76 77 78
    "//third_party/googletest:gtest_main",
  ]
}

group("moduletest") {
  testonly = true
  deps = [ ":InitModuleTest" ]
}

79
group("paramtestmodule") {
X
xionglei6 已提交
80
  if (param_test) {
81
    deps = [ ":libparamtestmodule" ]
X
xionglei6 已提交
82 83
  }
}