• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13
14import("//base/time/time_service/time.gni")
15import("//build/test.gni")
16
17config("module_private_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "//base/time/time_service/interfaces/innerkits/include",
22    "//foundation/arkui/napi/interfaces/kits/napi",
23    "//third_party/json/include",
24    "//base/time/time_service/utils/native/include",
25    "${time_service_path}",
26  ]
27}
28
29module_output_path = "time_utils/time_native"
30
31ohos_unittest("TimePermissionTest") {
32  module_out_path = module_output_path
33
34  sources = [ "unittest/time_permission_test.cpp" ]
35
36  configs = [ ":module_private_config" ]
37
38  deps = [
39    "//base/time/time_service/interfaces/inner_api:time_client",
40    "//base/time/time_service/utils:time_utils",
41    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk",
42    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
43    "//third_party/googletest:gtest_main",
44    "//third_party/jsoncpp:jsoncpp",
45  ]
46
47  external_deps = [
48    "ability_base:want",
49    "ability_runtime:runtime",
50    "ability_runtime:wantagent_innerkits",
51    "c_utils:utils",
52    "hiviewdfx_hilog_native:libhilog",
53    "ipc:ipc_core",
54    "safwk:system_ability_fwk",
55    "samgr:samgr_proxy",
56  ]
57}
58
59group("unittest") {
60  testonly = true
61
62  deps = [
63    ":TimePermissionTest",
64  ]
65}