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("//build/test.gni") 15 16module_output_path = "neural_network_runtime/" 17 18config("system_test_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "../..", 23 "../../frameworks/native/neural_network_runtime", 24 "../../frameworks/native/neural_network_core", 25 "//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include", 26 ] 27 28 cflags = [ 29 "-Wall", 30 "-Wextra", 31 "-Werror", 32 ] 33} 34 35ohos_systemtest("DeviceTest") { 36 module_out_path = module_output_path 37 sources = [ "./device_test.cpp" ] 38 39 configs = [ ":system_test_config" ] 40 41 deps = [ 42 "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", 43 "//third_party/googletest:gtest_main", 44 ] 45 46 external_deps = [ 47 "c_utils:utils", 48 "drivers_interface_nnrt:libnnrt_proxy_1.0", 49 "hdf_core:libhdf_utils", 50 "hilog:libhilog", 51 "hitrace:hitrace_meter", 52 ] 53} 54 55ohos_systemtest("End2EndTest") { 56 module_out_path = module_output_path 57 sources = [ 58 "./common/nnrt_test.cpp", 59 "./end_to_end_test.cpp", 60 ] 61 62 configs = [ ":system_test_config" ] 63 64 deps = [ 65 "../../frameworks/native/neural_network_core:libneural_network_core", 66 "../../frameworks/native/neural_network_runtime:libneural_network_runtime", 67 "//third_party/googletest:gtest_main", 68 ] 69 70 external_deps = [ 71 "c_utils:utils", 72 "drivers_interface_nnrt:libnnrt_proxy_1.0", 73 "hdf_core:libhdf_utils", 74 "hilog:libhilog", 75 "hitrace:hitrace_meter", 76 "hitrace:libhitracechain", 77 "mindspore:mindir", 78 ] 79} 80 81group("system_test") { 82 testonly = true 83 deps = [ 84 ":DeviceTest", 85 ":End2EndTest", 86 ] 87} 88