1# Copyright (c) 2025 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/video_processing_engine/config.gni") 16 17video_moduletest_native_include_dirs = [ 18 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/test/ndk/moduletest/common", 19 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/interface/kits/c", 20] 21 22video_moduletest_cflags = [ 23 "-std=c++17", 24 "-fno-rtti", 25 "-fno-exceptions", 26 "-Wall", 27 "-fno-common", 28 "-fstack-protector-strong", 29 "-Wshadow", 30 "-FPIC", 31 "-FS", 32 "-O2", 33 "-D_FORTIFY_SOURCE=2", 34 "-fvisibility=hidden", 35 "-Wformat=2", 36 "-Wdate-time", 37 "-Werror", 38 "-Wextra", 39 "-Wimplicit-fallthrough", 40 "-Wsign-compare", 41 "-Wunused-parameter", 42] 43 44################################################################################################################## 45ohos_unittest("vpe_video_native_module_test") { 46 module_out_path = "video_processing_engine/moduletest" 47 include_dirs = video_moduletest_native_include_dirs 48 include_dirs += [ "./" ] 49 cflags = video_moduletest_cflags 50 51 sources = [ 52 "api_test.cpp", 53 "func_test.cpp", 54 "reli_test.cpp", 55 "video_sample.cpp", 56 ] 57 58 deps = [ 59 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework:video_processing", 60 ] 61 62 external_deps = [ 63 "c_utils:utils", 64 "graphic_2d:libgraphic_utils", 65 "graphic_2d:librender_service_client", 66 "graphic_surface:surface", 67 "hilog:libhilog", 68 "ipc:ipc_core", 69 "media_foundation:native_media_core", 70 "window_manager:libwm", 71 "json:nlohmann_json_static", 72 "openssl:libcrypto_shared" 73 ] 74 resource_config_file = "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/test/ndk/moduletest/resources/ohos_test.xml" 75} 76