1# Copyright (c) 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.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/config/test.gni")
15
16unittest("ai_test_function_door") {
17  output_extension = "bin"
18  output_dir = "$root_out_dir/test/unittest/ai"
19  ldflags = [
20    "-lstdc++",
21    "-ldl",
22  ]
23  include_dirs = [
24    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog",
25    "//foundation/ai/ai_engine/interfaces",
26    "//foundation/ai/ai_engine/services/client",
27    "//foundation/ai/ai_engine/services/common",
28    "//foundation/ai/ai_engine/services/server",
29    "//foundation/ai/ai_engine/test/utils",
30    "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
31    "//foundation/systemabilitymgr/samgr_lite/interfaces/innerkits/registry",
32    "//foundation/systemabilitymgr/samgr_lite/interfaces/innerkits/samgr",
33    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
34    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
35    "//third_party/bounds_checking_function/include",
36    "//commonlibrary/utils_lite/include",
37  ]
38  deps = [
39    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
40    "//foundation/ai/ai_engine/services/client:client",
41    "//foundation/ai/ai_engine/services/common/platform/dl_operation:dlOperation",
42    "//foundation/ai/ai_engine/services/common/platform/lock:lock",
43    "//foundation/ai/ai_engine/services/common/protocol/data_channel:data_channel",
44    "//foundation/ai/ai_engine/services/server/plugin_manager:plugin_manager",
45    "//foundation/ai/ai_engine/test/sample:sample_plugin_1",
46    "//foundation/ai/ai_engine/test/sample:sample_plugin_2",
47    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
48  ]
49  sources = [
50    "async_process/async_process_function_test.cpp",
51    "destroy/destroy_function_test.cpp",
52    "init/init_function_test.cpp",
53    "plugin_label/plugin_label_test.cpp",
54    "plugin_manager/plugin_manager_test.cpp",
55    "prepare/prepare_function_test.cpp",
56    "release/release_function_test.cpp",
57    "sa_client/sa_client_test.cpp",
58    "set_get_option/option_function_test.cpp",
59    "share_memory/share_memory_test.cpp",
60    "sync_process/sync_process_function_test.cpp",
61  ]
62}
63
64group("function") {
65  deps = [
66    ":ai_test_function_door",
67    "death_callback:testDeathCallback",
68  ]
69}
70