• 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")
15
16module_output_path = "camera_standard/camera_framework_unittest"
17
18ohos_unittest("camera_framework_unittest") {
19  module_out_path = module_output_path
20  include_dirs = [
21    "./include",
22    "//drivers/adapter/uhdf2/osal/include",
23    "//drivers/adapter/uhdf2/include/hdi",
24    "//drivers/framework/include/utils",
25    "//foundation/graphic/standard/frameworks/surface/include",
26    "//foundation/multimedia/camera_standard/services/camera_service/include",
27    "//foundation/multimedia/camera_standard/services/camera_service/binder/base/include",
28    "//foundation/multimedia/camera_standard/services/camera_service/binder/client/include",
29    "//foundation/multimedia/camera_standard/services/camera_service/binder/server/include",
30    "//drivers/peripheral/camera/interfaces/metadata/include",
31    "//foundation/multimedia/camera_standard/interfaces/inner_api/native/camera/include",
32    "//foundation/multimedia/camera_standard/interfaces/inner_api/native/test",
33    "//base/security/access_token/interfaces/innerkits/accesstoken/include",
34    "//base/security/access_token/interfaces/innerkits/token_setproc/include",
35  ]
36
37  sources = [
38    "//foundation/multimedia/camera_standard/interfaces/inner_api/native/test/test_common.cpp",
39    "src/camera_framework_unittest.cpp",
40  ]
41
42  deps = [
43    "//drivers/adapter/uhdf2/hdi:libhdi",
44    "//drivers/peripheral/camera/interfaces/metadata:metadata",
45    "//foundation/graphic/standard:libsurface",
46    "//foundation/multimedia/camera_standard/frameworks/native/camera:camera_framework",
47    "//foundation/multimedia/camera_standard/services/camera_service:camera_service",
48    "//third_party/googletest:gmock_main",
49  ]
50
51  external_deps = [
52    "access_token:libaccesstoken_sdk",
53    "access_token:libtoken_setproc",
54    "hiviewdfx_hilog_native:libhilog",
55    "safwk:system_ability_fwk",
56  ]
57
58  cflags = [ "-fPIC" ]
59  if (device_name == "baltimore") {
60    cflags += [ "-DBALTIMORE_CAMERA" ]
61    include_dirs += [
62      "//drivers/peripheral/adapter/camera/interfaces/include",
63      "//drivers/peripheral/adapter/camera/interfaces/include/callback/device",
64      "//drivers/peripheral/adapter/camera/interfaces/include/callback/operator",
65      "//drivers/peripheral/adapter/camera/interfaces/include/callback/host",
66    ]
67  } else {
68    if (device_name == "rk3566" || device_name == "rk3568") {
69      cflags += [ "-DRK_CAMERA" ]
70    }
71    include_dirs += [
72      "//drivers/peripheral/camera/interfaces/include",
73      "//drivers/peripheral/camera/interfaces/hdi_ipc",
74      "//drivers/peripheral/camera/interfaces/hdi_ipc/server",
75      "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/device/include",
76      "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/operator/include",
77      "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/host/include",
78    ]
79  }
80  cflags_cc = cflags
81}
82