99 lines
2.9 KiB
Plaintext
Executable File
99 lines
2.9 KiB
Plaintext
Executable File
# 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.
|
|
|
|
import("//base/startup/init/begetd.gni")
|
|
import("//build/ohos.gni")
|
|
import("//build/test.gni")
|
|
|
|
ohos_shared_library("libparamtestmodule") {
|
|
sources = [ "param_test_module.c" ]
|
|
|
|
include_dirs = [
|
|
"//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/services/param/include",
|
|
"//base/startup/init/ueventd/include",
|
|
"//base/startup/init/device_info",
|
|
"//third_party/cJSON",
|
|
"//third_party/bounds_checking_function/include",
|
|
]
|
|
|
|
deps = [
|
|
"//base/startup/init/interfaces/innerkits:libbegetutil",
|
|
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
|
|
"//base/startup/init/services/log:agent_log",
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
]
|
|
|
|
part_name = "init"
|
|
subsystem_name = "startup"
|
|
module_install_dir = "lib/init"
|
|
}
|
|
|
|
ohos_moduletest("InitModuleTest") {
|
|
module_out_path = "startup/init"
|
|
|
|
sources = [
|
|
"hookmgr_moduletest.cpp",
|
|
"modulemgr_moduletest.cpp",
|
|
"service_control_test.cpp",
|
|
"service_watcher_moduleTest.cpp",
|
|
"syspara_moduleTest.cpp",
|
|
"test_utils.cpp",
|
|
]
|
|
|
|
if (enable_ohos_startup_init_feature_deviceinfo) {
|
|
sources += [ "deviceinfo_moduleTest.cpp" ]
|
|
}
|
|
|
|
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",
|
|
"//base/startup/init/services/param/include",
|
|
"//base/startup/init/device_info",
|
|
".",
|
|
]
|
|
|
|
deps = [
|
|
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
|
|
"//base/startup/init/interfaces/innerkits:libbegetutil",
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
"//third_party/googletest:gtest_main",
|
|
"//base/startup/init/interfaces/innerkits/syspara:begetutil_ph",
|
|
]
|
|
|
|
external_deps = [
|
|
"c_utils:utils",
|
|
"hilog:libhilog_base",
|
|
"ipc:ipc_single",
|
|
"samgr:samgr_proxy",
|
|
]
|
|
}
|
|
|
|
group("moduletest") {
|
|
testonly = true
|
|
deps = [ ":InitModuleTest" ]
|
|
}
|
|
|
|
group("paramtestmodule") {
|
|
if (param_test) {
|
|
deps = [ ":libparamtestmodule" ]
|
|
}
|
|
}
|