1# Copyright (c) 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.
13
14import("//build/ohos.gni")
15import("//build/test.gni")
16import("//foundation/ability/ability_runtime/ability_runtime.gni")
17
18module_output_path = "ability_runtime/runtime"
19config("coverage_flags") {
20  if (ability_runtime_feature_coverage) {
21    cflags = [ "--coverage" ]
22    ldflags = [ "--coverage" ]
23  }
24}
25
26ohos_unittest("dummy_values_bucket_test") {
27  module_out_path = module_output_path
28
29  include_dirs = []
30
31  sources = [
32    "${ability_runtime_native_path}/ability/native/dummy_values_bucket.cpp",
33    "dummy_values_bucket_test.cpp",
34  ]
35
36  configs = [
37    ":coverage_flags",
38    "${ability_runtime_services_path}/abilitymgr:abilityms_config",
39    "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config",
40  ]
41  cflags = []
42  if (target_cpu == "arm") {
43    cflags += [ "-DBINDER_IPC_32BIT" ]
44  }
45
46  deps = [ "//third_party/googletest:gmock_main" ]
47
48  external_deps = [
49    "ability_base:want",
50    "ability_runtime:ability_manager",
51    "ability_runtime:abilitykit_native",
52    "c_utils:utils",
53    "hilog:libhilog",
54    "ipc:ipc_core",
55    "napi:ace_napi",
56  ]
57
58  if (background_task_mgr_continuous_task_enable) {
59    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
60  }
61}
62
63group("unittest") {
64  testonly = true
65
66  deps = [ ":dummy_values_bucket_test" ]
67}
68