1# Copyright (c) 2020-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. 13 14import("//base/startup/init/begetd.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17 18ohos_shared_library("libparamtestmodule") { 19 sources = [ "param_test_module.c" ] 20 21 include_dirs = [ 22 "//base/startup/init/services/include/param", 23 "//base/startup/init/services/include", 24 "//base/startup/init/services/init/include", 25 "//base/startup/init/services/log", 26 "//base/startup/init/interfaces/innerkits/include", 27 "//base/startup/init/services/loopevent/include", 28 "//base/startup/init/ueventd/include", 29 "//third_party/cJSON", 30 "//third_party/bounds_checking_function/include", 31 ] 32 33 deps = [ 34 "//base/startup/init/interfaces/innerkits:libbegetutil", 35 "//base/startup/init/services/log:agent_log", 36 "//third_party/bounds_checking_function:libsec_shared", 37 ] 38 39 external_deps = [ "init:libinit_module_engine" ] 40 41 part_name = "init" 42 subsystem_name = "startup" 43 module_install_dir = "lib/init" 44} 45 46ohos_moduletest("InitModuleTest") { 47 module_out_path = "startup/init" 48 49 sources = [ 50 "hookmgr_moduletest.cpp", 51 "modulemgr_moduletest.cpp", 52 "service_control_test.cpp", 53 "service_watcher_moduleTest.cpp", 54 "syspara_moduleTest.cpp", 55 "test_utils.cpp", 56 ] 57 58 include_dirs = [ 59 "//base/startup/init/interfaces/innerkits/include", 60 "//base/startup/init/interfaces/innerkits/include/syspara", 61 "//base/startup/init/interfaces/innerkits/syspara", 62 "//base/startup/init/services/include/param", 63 ".", 64 ] 65 66 deps = [ 67 "//base/startup/init/interfaces/innerkits:libbeget_proxy", 68 "//base/startup/init/interfaces/innerkits:libbegetutil", 69 "//third_party/bounds_checking_function:libsec_shared", 70 "//third_party/googletest:gtest_main", 71 ] 72} 73 74group("moduletest") { 75 testonly = true 76 deps = [ ":InitModuleTest" ] 77} 78 79group("paramtestmodule") { 80 if (param_test) { 81 deps = [ ":libparamtestmodule" ] 82 } 83} 84