BUILD.gn 2.4 KB
Newer Older
M
Mupceet 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
# Copyright (c) 2022 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")
M
Mupceet 已提交
15 16 17 18 19
import("//build/ohos.gni")

ohos_executable("client") {
  sources = [ "client.c" ]
  include_dirs = [
M
init  
Mupceet 已提交
20 21
    "//base/startup/init/services/log",
    "//base/startup/init/interfaces/innerkits/include",
M
Mupceet 已提交
22 23 24
    "//third_party/bounds_checking_function/include",
  ]
  deps = [
M
init  
Mupceet 已提交
25
    "//base/startup/init/interfaces/innerkits:libbegetutil",
M
Mupceet 已提交
26 27 28 29 30 31 32 33 34 35 36 37
    "//third_party/bounds_checking_function:libsec_static",
  ]
  install_images = [ "system" ]
  install_enable = true
  part_name = "init"
}

ohos_executable("fd_holder_test") {
  sources = [ "fd_holder_test.c" ]

  defines = [ "INIT_AGENT" ]

M
init  
Mupceet 已提交
38
  deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ]
M
Mupceet 已提交
39

M
init  
Mupceet 已提交
40
  include_dirs = [ "//base/startup/init/interfaces/innerkits/include" ]
M
Mupceet 已提交
41 42 43 44 45 46 47 48

  install_images = [ "system" ]
  install_enable = true

  part_name = "init"
}

ohos_prebuilt_etc("fd_holder_test.cfg") {
M
init  
Mupceet 已提交
49
  source = "//base/startup/init/test/exec_test/fd_holder_test.cfg"
M
Mupceet 已提交
50 51 52 53 54 55 56
  part_name = "init"
  module_install_dir = "etc/init"
}

ohos_executable("server") {
  sources = [ "server.c" ]
  include_dirs = [
M
init  
Mupceet 已提交
57 58
    "//base/startup/init/services/log",
    "//base/startup/init/interfaces/innerkits/include",
M
Mupceet 已提交
59 60 61
    "//third_party/bounds_checking_function/include",
  ]
  deps = [
M
init  
Mupceet 已提交
62
    "//base/startup/init/interfaces/innerkits:libbegetutil",
M
Mupceet 已提交
63 64 65 66 67 68 69
    "//third_party/bounds_checking_function:libsec_static",
  ]
  install_images = [ "system" ]
  install_enable = true
  part_name = "init"
}

M
Mupceet 已提交
70
ohos_executable("ondemandTest") {
M
Mupceet 已提交
71
  sources = [ "sa_service_ondemand_test.cpp" ]
M
Mupceet 已提交
72 73

  external_deps = [
H
hongtao 已提交
74
    "c_utils:utils",
M
Mupceet 已提交
75 76 77 78 79
    "ipc:ipc_core",
    "safwk:system_ability_fwk",
    "samgr_standard:samgr_proxy",
  ]

M
Mupceet 已提交
80
  install_images = [ "system" ]
M
Mupceet 已提交
81 82 83 84
  install_enable = true
  part_name = "init"
}

M
Mupceet 已提交
85 86 87 88 89 90
group("exectest") {
  if (control_test) {
    deps = [
      ":client",
      ":fd_holder_test",
      ":fd_holder_test.cfg",
M
Mupceet 已提交
91
      ":ondemandTest",
M
Mupceet 已提交
92
      ":server",
M
Mupceet 已提交
93 94 95
    ]
  }
}