• 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/ohos.gni")
15import("//build/test.gni")
16
17module_output_path = "drm_framework/drm"
18
19config("drm_framework_capi_unittest_v1_0_config") {
20  include_dirs = [
21    "../../../../interfaces/kits/c/drm_capi/include",
22    "../../../../interfaces/kits/c/drm_capi/common",
23    "../../../../frameworks/native/test/unittest/include",
24    "../../../../frameworks/native/test/common/include",
25    "../../../../interfaces/inner_api/native/drm",
26    "../../../../services/utils/include",
27  ]
28
29  cflags = [
30    "-fno-exceptions",
31    "-Wall",
32    "-fno-common",
33    "-fstack-protector-all",
34    "-Wshadow",
35    "-FPIC",
36    "-FS",
37    "-O2",
38    "-D_FORTIFY_SOURCE=2",
39    "-Wformat=2",
40    "-Wdate-time",
41  ]
42  cflags_cc = [ "-fno-rtti" ]
43}
44
45ohos_unittest("drm_framework_capi_unittest_v1_0") {
46  module_out_path = module_output_path
47  configs = [ ":drm_framework_capi_unittest_v1_0_config" ]
48
49  sanitize = {
50    cfi = true
51    cfi_cross_dso = true
52    cfi_vcall_icall_only = true
53    debug = true
54  }
55  cflags = []
56  sources = [
57    "../../../../frameworks/native/test/common/src/http.cpp",
58    "../../../../frameworks/native/test/unittest/src/drm_framework_dfx_unittest.cpp",
59    "../../../../frameworks/native/test/unittest/src/drm_framework_unittest.cpp",
60    "../../../../services/utils/drm_dfx.cpp",
61  ]
62
63  deps = [
64    "../../../../frameworks/native:drm_framework",
65    "../../../../interfaces/kits/c/drm_capi:native_drm",
66    "../../../../interfaces/kits/js/drm_napi:drm_napi",
67    "../../../../services/drm_service:drm_service",
68    "../../../../services/drm_service/idls:idl_sa_proxy",
69  ]
70
71  external_deps = [
72    "c_utils:utils",
73    "curl:curl_shared",
74    "googletest:gmock_main",
75    "hidumper:lib_dump_usage",
76    "hilog:libhilog",
77    "hisysevent:libhisysevent",
78    "hitrace:libhitracechain",
79    "ipc:ipc_core",
80  ]
81  subsystem_name = "multimedia"
82  part_name = "drm_framework"
83}
84