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_unittest("MindSporeUnitTest") { 23be168c0dSopenharmony_ci module_out_path = module_output_path 24be168c0dSopenharmony_ci resource_config_file = "../resource/ohos_test.xml" 25be168c0dSopenharmony_ci 26be168c0dSopenharmony_ci sources = [ 27be168c0dSopenharmony_ci "../utils/common.cpp", 28be168c0dSopenharmony_ci "../utils/model_utils.cpp", 29be168c0dSopenharmony_ci "./mindspore_unit_test.cpp", 30be168c0dSopenharmony_ci "./nnrt_delegate_unit_test.cpp", 31be168c0dSopenharmony_ci ] 32be168c0dSopenharmony_ci 33be168c0dSopenharmony_ci configs = [ ":module_private_config" ] 34be168c0dSopenharmony_ci 35be168c0dSopenharmony_ci deps = [ 36be168c0dSopenharmony_ci "//third_party/googletest:gmock", 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 = [ "c_utils:utils" ] 42be168c0dSopenharmony_ci} 43be168c0dSopenharmony_ci 44be168c0dSopenharmony_cigroup("unit_test") { 45be168c0dSopenharmony_ci testonly = true 46be168c0dSopenharmony_ci deps = [ ":MindSporeUnitTest" ] 47be168c0dSopenharmony_ci} 48