1# Copyright (c) 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/init/begetd.gni") 15import("//build/ohos.gni") 16 17ohos_executable("client") { 18 sources = [ "client.c" ] 19 include_dirs = [ 20 "//base/startup/init/services/log", 21 "//base/startup/init/interfaces/innerkits/include", 22 "//third_party/bounds_checking_function/include", 23 ] 24 deps = [ 25 "//base/startup/init/interfaces/innerkits:libbegetutil", 26 "//third_party/bounds_checking_function:libsec_static", 27 ] 28 install_images = [ "system" ] 29 install_enable = true 30 part_name = "init" 31 subsystem_name = "startup" 32} 33 34ohos_executable("fd_holder_test") { 35 sources = [ "fd_holder_test.c" ] 36 37 defines = [ "INIT_AGENT" ] 38 39 deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ] 40 41 include_dirs = [ "//base/startup/init/interfaces/innerkits/include" ] 42 43 install_images = [ "system" ] 44 install_enable = true 45 46 part_name = "init" 47 subsystem_name = "startup" 48} 49 50ohos_prebuilt_etc("fd_holder_test.cfg") { 51 source = "//base/startup/init/test/exec_test/fd_holder_test.cfg" 52 part_name = "init" 53 subsystem_name = "startup" 54 module_install_dir = "etc/init" 55} 56 57ohos_executable("server") { 58 sources = [ "server.c" ] 59 include_dirs = [ 60 "//base/startup/init/services/log", 61 "//base/startup/init/interfaces/innerkits/include", 62 "//third_party/bounds_checking_function/include", 63 ] 64 deps = [ 65 "//base/startup/init/interfaces/innerkits:libbegetutil", 66 "//third_party/bounds_checking_function:libsec_static", 67 ] 68 install_images = [ "system" ] 69 install_enable = true 70 part_name = "init" 71 subsystem_name = "startup" 72} 73 74ohos_executable("ondemandTest") { 75 sources = [ "sa_service_ondemand_test.cpp" ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "ipc:ipc_core", 80 "safwk:system_ability_fwk", 81 "samgr:samgr_proxy", 82 ] 83 84 install_images = [ "system" ] 85 install_enable = true 86 part_name = "init" 87 subsystem_name = "startup" 88} 89 90group("exectest") { 91 deps = [ 92 ":client", 93 ":fd_holder_test", 94 ":fd_holder_test.cfg", 95 ":ondemandTest", 96 ":server", 97 ] 98} 99