mirror of
https://github.com/openharmony/startup_init_lite.git
synced 2026-07-01 03:23:16 -04:00
f93d708fa9
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
86 lines
3.1 KiB
Plaintext
Executable File
86 lines
3.1 KiB
Plaintext
Executable File
# Copyright (c) 2020 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.
|
|
if (defined(ohos_lite)) {
|
|
import("//build/lite/config/component/lite_component.gni")
|
|
import("//build/lite/config/test.gni")
|
|
|
|
unittest("init_test") {
|
|
output_extension = "bin"
|
|
output_dir = "$root_out_dir/test/unittest/startup"
|
|
ldflags = [
|
|
"-lstdc++",
|
|
"-lpthread",
|
|
"-lm",
|
|
]
|
|
defines = [ "OHOS_LITE" ]
|
|
if (storage_type == "emmc") {
|
|
defines += [ "USE_EMMC_STORAGE" ]
|
|
}
|
|
|
|
include_dirs = [
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/init/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//third_party/cJSON",
|
|
"//third_party/bounds_checking_function/include",
|
|
"//base/startup/syspara_lite/interfaces/kits",
|
|
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
|
|
]
|
|
|
|
sources = [
|
|
"//base/startup/init_lite/services/init/adapter/init_adapter.c",
|
|
"//base/startup/init_lite/services/init/init_capability.c",
|
|
"//base/startup/init_lite/services/init/init_common_cmds.c",
|
|
"//base/startup/init_lite/services/init/init_common_service.c",
|
|
"//base/startup/init_lite/services/init/init_config.c",
|
|
"//base/startup/init_lite/services/init/init_service_manager.c",
|
|
"//base/startup/init_lite/services/init/init_service_socket.c",
|
|
"//base/startup/init_lite/services/init/lite/init.c",
|
|
"//base/startup/init_lite/services/init/lite/init_cmds.c",
|
|
"//base/startup/init_lite/services/init/lite/init_jobs.c",
|
|
"//base/startup/init_lite/services/init/lite/init_reboot.c",
|
|
"//base/startup/init_lite/services/init/lite/init_service.c",
|
|
"//base/startup/init_lite/services/init/lite/init_signal_handler.c",
|
|
"//base/startup/init_lite/services/log/init_log.c",
|
|
"//base/startup/init_lite/services/utils/init_utils.c",
|
|
"//base/startup/init_lite/services/utils/list.c",
|
|
"cmd_func_test.cpp",
|
|
]
|
|
|
|
deps = [
|
|
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
|
|
"//base/startup/init_lite/initsync:initsync",
|
|
"//base/startup/syspara_lite/frameworks/parameter:parameter",
|
|
"//build/lite/config/component/cJSON:cjson_shared",
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
]
|
|
if (ohos_kernel_type == "liteos_a") {
|
|
include_dirs += [
|
|
"//kernel/liteos_a/syscall",
|
|
"//base/startup/init_lite/interfaces/kits",
|
|
"//base/startup/init_lite/initsync/include",
|
|
]
|
|
}
|
|
}
|
|
|
|
group("unittest") {
|
|
deps = [ ":init_test" ]
|
|
}
|
|
} else {
|
|
import("//build/ohos.gni")
|
|
sources = []
|
|
group("unittest") {
|
|
deps = []
|
|
}
|
|
}
|