1be168c0dSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 2be168c0dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3be168c0dSopenharmony_ci# you may not use this file except in compliance with the License. 4be168c0dSopenharmony_ci# You may obtain a copy of the License at 5be168c0dSopenharmony_ci# 6be168c0dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7be168c0dSopenharmony_ci# 8be168c0dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9be168c0dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10be168c0dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11be168c0dSopenharmony_ci# See the License for the specific language governing permissions and 12be168c0dSopenharmony_ci# limitations under the License. 13be168c0dSopenharmony_ci 14be168c0dSopenharmony_ciimport("//build/test.gni") 15be168c0dSopenharmony_ci 16be168c0dSopenharmony_cimodule_output_path = "mindspore" 17be168c0dSopenharmony_ci 18be168c0dSopenharmony_ciconfig("module_private_config") { 19be168c0dSopenharmony_ci include_dirs = [ "//third_party/mindspore/mindspore-src/source/" ] 20be168c0dSopenharmony_ci} 21be168c0dSopenharmony_ci 22be168c0dSopenharmony_ciohos_fuzztest("MindSporeFuzzTest") { 23be168c0dSopenharmony_ci module_out_path = module_output_path + "/mindspore_lite" 24be168c0dSopenharmony_ci fuzz_config_file = "./mindspore_fuzzer" 25be168c0dSopenharmony_ci resource_config_file = "../resource/ohos_test.xml" 26be168c0dSopenharmony_ci 27be168c0dSopenharmony_ci sources = [ 28be168c0dSopenharmony_ci "../utils/common.cpp", 29be168c0dSopenharmony_ci "../utils/model_utils.cpp", 30be168c0dSopenharmony_ci "mindspore_fuzzer/context_c_fuzzer.cpp", 31be168c0dSopenharmony_ci "mindspore_fuzzer/mindspore_fuzzer.cpp", 32be168c0dSopenharmony_ci ] 33be168c0dSopenharmony_ci 34be168c0dSopenharmony_ci configs = [ ":module_private_config" ] 35be168c0dSopenharmony_ci 36be168c0dSopenharmony_ci deps = [ 37be168c0dSopenharmony_ci "//third_party/googletest:gtest", 38be168c0dSopenharmony_ci "//third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_ndk", 39be168c0dSopenharmony_ci ] 40be168c0dSopenharmony_ci 41be168c0dSopenharmony_ci external_deps = [ 42be168c0dSopenharmony_ci "c_utils:utils", 43be168c0dSopenharmony_ci "hilog:libhilog", 44be168c0dSopenharmony_ci ] 45be168c0dSopenharmony_ci} 46be168c0dSopenharmony_ci 47be168c0dSopenharmony_cigroup("fuzz_test") { 48be168c0dSopenharmony_ci testonly = true 49be168c0dSopenharmony_ci deps = [] 50be168c0dSopenharmony_ci 51be168c0dSopenharmony_ci deps += [ ":MindSporeFuzzTest" ] 52be168c0dSopenharmony_ci} 53