• 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.
13
14import("//build/test.gni")
15import("../../../../os_account.gni")
16
17module_output_path = "os_account/tools"
18
19ohos_unittest("account_command_test") {
20  branch_protector_ret = "pac_ret"
21
22  sanitize = {
23    cfi = true
24    cfi_cross_dso = true
25    debug = false
26  }
27
28  module_out_path = module_output_path
29
30  include_dirs = []
31
32  sources = [
33    "${tools_path}/acm/src/account_command.cpp",
34    "account_command_create_test.cpp",
35    "account_command_delete_test.cpp",
36    "account_command_dump_test.cpp",
37    "account_command_set_test.cpp",
38    "account_command_switch_test.cpp",
39    "account_command_test.cpp",
40  ]
41
42  configs = [
43    "${ability_runtime_path}/tools/aa:ability_command_config",
44    "${tools_path}/acm:tools_acm_config",
45  ]
46
47  cflags = []
48  if (target_cpu == "arm") {
49    cflags += [ "-DBINDER_IPC_32BIT" ]
50  }
51
52  deps = [
53    "${account_test_common}:account_test_common_source_set",
54    "${common_path}:libaccount_common",
55    "//third_party/googletest:gtest_main",
56  ]
57
58  external_deps = [
59    "ability_runtime:tools_aa_source_set",
60    "c_utils:utils",
61    "hilog:libhilog",
62    "ipc:ipc_single",
63    "os_account:os_account_innerkits",
64  ]
65}
66
67group("unittest") {
68  testonly = true
69  deps = []
70  if (os_account_enable_multiple_os_accounts || use_clang_coverage) {
71    deps += [ ":account_command_test" ]
72  }
73}
74