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") 15 16declare_args() { 17 if (defined(global_parts_info) && 18 defined(global_parts_info.multimedia_video_processing_engine_ext)) { 19 vpe_support_demo_test = true 20 vpe_support_unit_test = true 21 vpe_support_module_test = true 22 cscv_support_demo_test = true 23 cscv_support_unit_test = true 24 video_support_demo_test = true 25 image_processing_unit_test = true 26 detail_enhancer_video_unit_test = true 27 detail_enhancer_unit_test = true 28 detail_enhancer_video_ndk_unit_test = true 29 colorSpace_converter_video_ndk_unit_test = true 30 metadata_gen_video_ndk_unit_test = true 31 video_variable_refreshrate_unit_test = true 32 aihdr_enhancer_video_unit_test = true 33 service_unit_test = true 34 aihdr_enhancer_unit_test = true 35 contrast_enhancer_unit_test = true 36 services_fuzzer_test = true 37 } else { 38 vpe_support_demo_test = false 39 vpe_support_unit_test = false 40 vpe_support_module_test = false 41 cscv_support_demo_test = false 42 cscv_support_unit_test = false 43 video_support_demo_test = false 44 image_processing_unit_test = false 45 detail_enhancer_video_unit_test = false 46 detail_enhancer_unit_test = false 47 detail_enhancer_video_ndk_unit_test = false 48 colorSpace_converter_video_ndk_unit_test = false 49 metadata_gen_video_ndk_unit_test = false 50 video_variable_refreshrate_unit_test = false 51 aihdr_enhancer_video_unit_test = false 52 aihdr_enhancer_unit_test = false 53 service_unit_test = false 54 contrast_enhancer_unit_test = false 55 services_fuzzer_test = false 56 } 57 vpe_support_ndk_module_test = true 58} 59 60group("demo_test") { 61 testonly = true 62 deps = [] 63 if (vpe_support_demo_test) { 64 deps += [ "nativedemo/vpe_demo:vpe_demo" ] 65 } 66} 67 68group("unit_test") { 69 testonly = true 70 deps = [] 71 if (vpe_support_unit_test) { 72 deps += [ "unittest/vpe_framework:vpe_framework_unit_test" ] 73 } 74 if (image_processing_unit_test) { 75 deps += [ "unittest/image_processing:image_processing_unit_test" ] 76 } 77 if (detail_enhancer_unit_test) { 78 deps += [ "unittest/detail_enhancer:detail_enhancer_unit_test" ] 79 } 80 if (detail_enhancer_video_unit_test) { 81 deps += [ "unittest/detail_enhancer_video:detail_enhancer_video_unit_test" ] 82 } 83 if (detail_enhancer_video_ndk_unit_test) { 84 deps += [ 85 "unittest/detail_enhancer_video_ndk:detail_enhancer_video_ndk_unit_test", 86 ] 87 } 88 if (cscv_support_unit_test) { 89 deps += [ "unittest/colorspace_converter_video:colorspace_converter_video_unit_test" ] 90 } 91 if (colorSpace_converter_video_ndk_unit_test) { 92 deps += [ "unittest/colorSpace_converter_video_ndk:colorSpace_converter_video_ndk_unit_test" ] 93 } 94 if (metadata_gen_video_ndk_unit_test) { 95 deps += 96 [ "unittest/metadata_gen_video_ndk:metadata_gen_video_ndk_unit_test" ] 97 } 98 if (video_variable_refreshrate_unit_test) { 99 deps += [ "unittest/video_variable_refreshrate_test:video_variable_refreshrate_unit_test" ] 100 } 101 if (aihdr_enhancer_video_unit_test) { 102 deps += [ "unittest/aihdr_enhancer_video:aihdr_enhancer_video_unit_test" ] 103 } 104 if (service_unit_test) { 105 deps += [ "unittest/service:services_test" ] 106 } 107 if (aihdr_enhancer_unit_test) { 108 deps += [ "unittest/aihdr_enhancer_video:aihdr_enhancer_video_unit_test" ] 109 } 110 if (contrast_enhancer_unit_test) { 111 deps += [ "unittest/contrast_enhancer:contrast_enhancer_unit_test" ] 112 } 113} 114 115group("module_test") { 116 testonly = true 117 deps = [] 118 if (vpe_support_module_test) { 119 deps += [ 120 "moduletest/colorspace_converter:colorspace_converter_module_test", 121 "moduletest/colorspace_converter_video:colorspace_converter_video_module_test", 122 "moduletest/metadata_generator:metadata_generator_module_test", 123 "moduletest/metadata_generator_video:metadata_generator_video_module_test", 124 ] 125 } 126 if (vpe_support_ndk_module_test) { 127 deps += [ 128 "ndk:vpe_module_test", 129 ] 130 } 131} 132 133group("fuzz_test") { 134 testonly = true 135 deps = [] 136 if (services_fuzzer_test) { 137 deps += [ 138 "fuzztest/services_fuzzer:ServicesFuzzTest", 139 ] 140 } 141} 142