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_framework_unittest" 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 cflags = [ 29 "-fno-exceptions", 30 "-Wall", 31 "-fno-common", 32 "-fstack-protector-all", 33 "-Wshadow", 34 "-FPIC", 35 "-FS", 36 "-O2", 37 "-D_FORTIFY_SOURCE=2", 38 "-Wformat=2", 39 "-Wdate-time", 40 ] 41 cflags_cc = [ "-fno-rtti" ] 42} 43 44ohos_unittest("drm_framework_capi_unittest_v1_0") { 45 module_out_path = module_output_path 46 configs = [ ":drm_framework_capi_unittest_v1_0_config" ] 47 48 sanitize = { 49 cfi = true 50 cfi_cross_dso = true 51 debug = true 52 } 53 54 sources = [ 55 "../../../../frameworks/native/test/common/src/http.cpp", 56 "../../../../frameworks/native/test/unittest/src/drm_framework_unittest.cpp", 57 ] 58 59 deps = [ 60 "../../../../frameworks/native:drm_framework", 61 "../../../../interfaces/kits/c/drm_capi:native_drm", 62 "../../../../interfaces/kits/js/drm_napi:drm_napi", 63 "../../../../services/drm_service:drm_service", 64 "//third_party/curl:curl_shared", 65 "//third_party/googletest:gmock_main", 66 ] 67 68 external_deps = [ 69 "c_utils:utils", 70 "hilog:libhilog", 71 "hitrace:hitrace_meter", 72 "ipc:ipc_core", 73 ] 74 subsystem_name = "multimedia" 75 part_name = "drm_framework" 76} 77