• 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/os_account"
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 = [ "${tools_path}/acm:tools_acm_config" ]
43
44  cflags = []
45  if (target_cpu == "arm") {
46    cflags += [ "-DBINDER_IPC_32BIT" ]
47  }
48
49  cflags += [ "-DENABLE_MULTIPLE_ACTIVE_ACCOUNTS" ]
50
51  deps = [
52    "${account_test_common}:account_test_common_source_set",
53    "${common_path}:libaccount_common",
54    "${os_account_innerkits_native_path}:os_account_innerkits",
55  ]
56
57  external_deps = [
58    "ability_runtime:tools_aa_source_set",
59    "c_utils:utils",
60    "googletest:gmock_main",
61    "googletest:gtest_main",
62    "hilog:libhilog",
63    "ipc:ipc_single",
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