• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/config/test.gni")
15
16unittest("AppSpawnLiteTest") {
17  output_extension = "bin"
18  output_dir = "$root_out_dir/test/unittest/startup"
19  ldflags = [
20    "-lstdc++",
21    "-lpthread",
22    "-lm",
23  ]
24
25  include_dirs = [
26    "//base/startup/appspawn/interfaces/innerkits/include",
27    "//base/startup/appspawn/common/",
28    "//base/startup/appspawn/lite/",
29    "//base/startup/init/interfaces/innerkits/include",
30    "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
31    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
32    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
33    "//third_party/bounds_checking_function/include/",
34    "//third_party/cJSON",
35    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
36    "//commonlibrary/utils_lite/include",
37  ]
38
39  sources = [
40    "//base/startup/appspawn/common/appspawn_server.c",
41    "//base/startup/appspawn/lite/appspawn_message.c",
42    "//base/startup/appspawn/lite/appspawn_process.c",
43    "//base/startup/appspawn/lite/appspawn_service.c",
44    "app_spawn_lite_test.cpp",
45  ]
46
47  defines = [ "APPSPAWN_TEST" ]
48
49  deps = [
50    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
51    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
52    "//base/startup/init/interfaces/innerkits:libbegetutil",
53    "//build/lite/config/component/cJSON:cjson_shared",
54    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
55    "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
56    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
57    "//third_party/bounds_checking_function:libsec_shared",
58  ]
59
60  deps += [
61    "//foundation/arkui/ace_engine_lite/frameworks:ace_lite",
62    "//foundation/graphic/surface:lite_surface",
63    "//foundation/graphic/ui:lite_ui",
64    "//foundation/graphic/utils:lite_graphic_utils",
65  ]
66
67  if (ohos_kernel_type == "liteos_a") {
68    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
69  }
70}
71
72group("unittest") {
73  deps = [ ":AppSpawnLiteTest" ]
74}
75