• 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("//build/test.gni")
15
16MEDIA_LIB_BASE_DIR = "//foundation/multimedia/medialibrary_standard"
17MEDIA_LIB_INNERKITS_DIR = "$MEDIA_LIB_BASE_DIR/frameworks/innerkitsimpl"
18
19group("unittest") {
20  testonly = true
21
22  deps = [ ":mediascanner_unittest" ]
23}
24
25ohos_unittest("mediascanner_unittest") {
26  module_out_path = "medialibrary_standard/mediascanner"
27  sources = [ "./src/mediascanner_unit_test.cpp" ]
28
29  include_dirs = [
30    "./include",
31    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
32    "$MEDIA_LIB_BASE_DIR/interfaces/innerkits/native/include",
33    "//foundation/aafwk/standard/interfaces/innerkits/uri/include",
34    "//foundation/aafwk/standard/interfaces/innerkits/want/include",
35    "//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content",
36    "//foundation/aafwk/standard/interfaces/innerkits/ability_manager/include",
37    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr",
38    "//foundation/aafwk/standard/interfaces/innerkits/app_manager/include/appmgr",
39    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base/include",
40    "//foundation/distributeddatamgr/appdatamgr/interfaces/innerkits/native_rdb/include",
41    "//foundation/distributeddatamgr/appdatamgr/frameworks/innerkitsimpl/native_rdb\include",
42    "$MEDIA_LIB_INNERKITS_DIR/media_library/include",
43    "//utils/native/base/include",
44    "//utils/system/safwk/native/include",
45    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
46    "$MEDIA_LIB_INNERKITS_DIR/medialibrary_data_ability/include",
47    "//foundation/aafwk/standard/frameworks/kits/ability/native/include",
48    "//foundation/distributeddatamgr/appdatamgr/frameworks/innerkitsimpl/native_appdatafwk/include",
49    "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler/include",
50    "$MEDIA_LIB_BASE_DIR/frameworks/innerkitsimpl/media_scanner/include",
51    "//third_party/json/include",
52  ]
53
54  deps = [
55    "$MEDIA_LIB_BASE_DIR/services/media_scanner_service/client:media_scanner_client",
56    "$MEDIA_LIB_INNERKITS_DIR/media_library:media_library",
57    "$MEDIA_LIB_INNERKITS_DIR/medialibrary_data_ability:medialibrary_data_ability",
58    "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native",
59    "//foundation/aafwk/standard/interfaces/innerkits/uri:zuri",
60    "//foundation/aafwk/standard/interfaces/innerkits/want:want",
61    "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
62    "//utils/native/base:utils",
63  ]
64
65  external_deps = [
66    "hiviewdfx_hilog_native:libhilog",
67    "ipc:ipc_core",
68    "native_appdatamgr:native_appdatafwk",
69    "native_appdatamgr:native_dataability",
70    "native_appdatamgr:native_rdb",
71    "samgr_standard:samgr_proxy",
72  ]
73}
74