1# Copyright (c) 2022 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("//test/xts/tools/build/suite.gni") 15 16config("nnrt_config") { 17 include_dirs = [ 18 "../common", 19 "../../../../../../../foundation/ai/neural_network_runtime", 20 "//foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime", 21 "//foundation/ai/neural_network_runtime/frameworks/native/neural_network_core", 22 "../../../../../../../foundation/ai/neural_network_runtime/third_party/include", 23 "//third_party/googletest/googletest/include", 24 "//third_party/googletest/googlemock/include", 25 "//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include", 26 ] 27 cflags = [ "-Wno-error" ] 28 cflags_cc = [ "-fexceptions" ] 29} 30 31ohos_moduletest_suite("ActsAiNnrtFunctionV1_0Test") { 32 module_out_path = "acts/nnrt" 33 sources = [ 34 "../common/mock_idevice.cpp", 35 "../common/nnrt_utils.cpp", 36 "src/CompileTest.cpp", 37 "src/DeviceTest.cpp", 38 "src/ExecutorTest.cpp", 39 "src/MemoryTest.cpp", 40 "src/ModelTest.cpp", 41 ] 42 43 configs = [ ":nnrt_config" ] 44 45 deps = [ 46 "//third_party/googletest:gmock", 47 "//third_party/googletest:gtest", 48 ] 49 50 external_deps = [ 51 "c_utils:utils", 52 "drivers_interface_nnrt:libnnrt_proxy_1.0", 53 "hdf_core:libhdf_utils", 54 "hdf_core:libhdi", 55 "hilog:libhilog", 56 "hitrace:libhitracechain", 57 "ipc:ipc_single", 58 "mindspore:mindir", 59 "neural_network_runtime:nnrt_target", 60 ] 61 62 subsystem_name = "ai" 63 part_name = "neural_network_runtime" 64} 65