• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("//foundation/multimedia/player_framework/config.gni")
16
17module_output_path = "player_framework/screen_capture"
18
19ohos_unittest("screen_capture_native_unit_test") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "./",
23    "./screen_capture_unittest/include",
24    "./native/include",
25    "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include",
26    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
27  ]
28
29  cflags = [
30    "-Wall",
31    "-Werror",
32  ]
33
34  if (multimedia_player_framework_support_screen_capture) {
35    sources = [
36      "native/screen_capture_mock_factory.cpp",
37      "native/src/screen_capture_native_mock.cpp",
38      "screen_capture_unittest/src/screen_capture_unit_test.cpp",
39    ]
40  }
41
42  external_deps = [
43    "access_token:libaccesstoken_sdk",
44    "access_token:libnativetoken",
45    "access_token:libtoken_setproc",
46    "c_utils:utils",
47    "graphic_2d:surface",
48    "hilog:libhilog",
49    "player_framework:media_client",
50    "window_manager:libdm",
51  ]
52}
53
54##################################################################################################################
55
56ohos_unittest("screen_capture_capi_unit_test") {
57  module_out_path = module_output_path
58  include_dirs = [
59    "./",
60    "./screen_capture_unittest/include",
61    "./capi/include",
62    "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c",
63    "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include",
64    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common",
65    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
66  ]
67
68  cflags = [
69    "-Wall",
70    "-Werror",
71  ]
72
73  if (multimedia_player_framework_support_screen_capture) {
74    sources = [
75      "capi/screen_capture_mock_factory.cpp",
76      "capi/src/screen_capture_capi_mock.cpp",
77      "screen_capture_unittest/src/screen_capture_unit_test.cpp",
78    ]
79  }
80
81  deps = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c:native_avscreen_capture" ]
82
83  external_deps = [
84    "access_token:libaccesstoken_sdk",
85    "access_token:libnativetoken",
86    "access_token:libtoken_setproc",
87    "c_utils:utils",
88    "graphic_2d:surface",
89    "hilog:libhilog",
90    "player_framework:media_client",
91    "window_manager:libdm",
92  ]
93}
94