1020a203aSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2020a203aSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3020a203aSopenharmony_ci# you may not use this file except in compliance with the License. 4020a203aSopenharmony_ci# You may obtain a copy of the License at 5020a203aSopenharmony_ci# 6020a203aSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7020a203aSopenharmony_ci# 8020a203aSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9020a203aSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10020a203aSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11020a203aSopenharmony_ci# See the License for the specific language governing permissions and 12020a203aSopenharmony_ci# limitations under the License. 13020a203aSopenharmony_ciimport("//base/hiviewdfx/hiview/hiview.gni") 14020a203aSopenharmony_ciimport("//build/ohos.gni") 15020a203aSopenharmony_ciimport("//build/test.gni") 16020a203aSopenharmony_ci 17020a203aSopenharmony_cimodule_output_path = "hiview/hiview//bbox_detector" 18020a203aSopenharmony_ci 19020a203aSopenharmony_ciconfig("bbox_detector_test_config") { 20020a203aSopenharmony_ci visibility = [ ":*" ] 21020a203aSopenharmony_ci include_dirs = [ 22020a203aSopenharmony_ci "../", 23020a203aSopenharmony_ci "../include", 24020a203aSopenharmony_ci "moduletest", 25020a203aSopenharmony_ci "mock", 26020a203aSopenharmony_ci "unittest", 27020a203aSopenharmony_ci "$hiview_root/utility/common_utils/include", 28020a203aSopenharmony_ci "$hiview_root/utility/smart_parser", 29020a203aSopenharmony_ci "$hiview_root/utility/smart_parser/feature_analysis/include", 30020a203aSopenharmony_ci ] 31020a203aSopenharmony_ci} 32020a203aSopenharmony_ci 33020a203aSopenharmony_cibbox_detector_test_source = [ 34020a203aSopenharmony_ci "../bbox_detector_plugin.cpp", 35020a203aSopenharmony_ci "../panic_error_info_handle.cpp", 36020a203aSopenharmony_ci "../panic_report_recovery.cpp", 37020a203aSopenharmony_ci "mock/bbox_detectors_mock.cpp", 38020a203aSopenharmony_ci "mock/hisysevent_util_mock.cpp", 39020a203aSopenharmony_ci] 40020a203aSopenharmony_ci 41020a203aSopenharmony_ciohos_unittest("BBoxDetectorUnitTest") { 42020a203aSopenharmony_ci sources = [ "unittest/bbox_detector_unit_test.cpp" ] 43020a203aSopenharmony_ci 44020a203aSopenharmony_ci sources += bbox_detector_test_source 45020a203aSopenharmony_ci 46020a203aSopenharmony_ci configs = [ ":bbox_detector_test_config" ] 47020a203aSopenharmony_ci 48020a203aSopenharmony_ci external_deps = [ 49020a203aSopenharmony_ci "bounds_checking_function:libsec_shared", 50020a203aSopenharmony_ci "googletest:gmock", 51020a203aSopenharmony_ci "googletest:gtest_main", 52020a203aSopenharmony_ci "hilog:libhilog", 53020a203aSopenharmony_ci "hisysevent:libhisysevent", 54020a203aSopenharmony_ci "init:libbegetutil", 55020a203aSopenharmony_ci "zlib:shared_libz", 56020a203aSopenharmony_ci ] 57020a203aSopenharmony_ci 58020a203aSopenharmony_ci cflags = [ "-DUNITTEST" ] 59020a203aSopenharmony_ci 60020a203aSopenharmony_ci deps = [ 61020a203aSopenharmony_ci "$hiview_base:hiviewbase_static_lib_for_tdd", 62020a203aSopenharmony_ci "$hiview_base/event_store:event_store_source", 63020a203aSopenharmony_ci "$hiview_root/utility/common_utils:hiview_reliability_common_utils", 64020a203aSopenharmony_ci "$hiview_root/utility/smart_parser:smart_parser", 65020a203aSopenharmony_ci ] 66020a203aSopenharmony_ci 67020a203aSopenharmony_ci module_out_path = module_output_path 68020a203aSopenharmony_ci} 69020a203aSopenharmony_ci 70020a203aSopenharmony_ciohos_moduletest("BBoxDetectorModuleTest") { 71020a203aSopenharmony_ci sources = [ "moduletest/bbox_detector_module_test.cpp" ] 72020a203aSopenharmony_ci 73020a203aSopenharmony_ci sources += bbox_detector_test_source 74020a203aSopenharmony_ci 75020a203aSopenharmony_ci configs = [ ":bbox_detector_test_config" ] 76020a203aSopenharmony_ci 77020a203aSopenharmony_ci cflags = [ "-DUNITTEST" ] 78020a203aSopenharmony_ci 79020a203aSopenharmony_ci external_deps = [ 80020a203aSopenharmony_ci "bounds_checking_function:libsec_shared", 81020a203aSopenharmony_ci "googletest:gmock", 82020a203aSopenharmony_ci "googletest:gtest_main", 83020a203aSopenharmony_ci "hilog:libhilog", 84020a203aSopenharmony_ci "hisysevent:libhisysevent", 85020a203aSopenharmony_ci "init:libbegetutil", 86020a203aSopenharmony_ci "zlib:shared_libz", 87020a203aSopenharmony_ci ] 88020a203aSopenharmony_ci 89020a203aSopenharmony_ci deps = [ 90020a203aSopenharmony_ci "$hiview_base:hiviewbase_static_lib_for_tdd", 91020a203aSopenharmony_ci "$hiview_base/event_store:event_store_source", 92020a203aSopenharmony_ci "$hiview_root/utility/common_utils:hiview_reliability_common_utils", 93020a203aSopenharmony_ci "$hiview_root/utility/smart_parser:smart_parser", 94020a203aSopenharmony_ci ] 95020a203aSopenharmony_ci 96020a203aSopenharmony_ci module_out_path = module_output_path 97020a203aSopenharmony_ci} 98