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 "//foundation/ai/neural_network_runtime", 23 "//third_party/mindspore/mindspore/lite/mindir/include" 24 ] 25 26 cflags = [ 27 "-Wall", 28 "-Wextra", 29 "-Werror", 30 ] 31} 32 33ohos_systemtest("DeviceTest") { 34 module_out_path = module_output_path 35 sources = ["//foundation/ai/neural_network_runtime/test/system_test/device_test.cpp"] 36 37 configs = [ ":system_test_config" ] 38 39 deps = [ 40 "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", 41 "//third_party/googletest:gtest_main", 42 ] 43 44 external_deps = [ 45 "hiviewdfx_hilog_native:libhilog", 46 "c_utils:utils", 47 "hitrace_native:hitrace_meter", 48 "drivers_interface_nnrt:libnnrt_proxy_1.0", 49 "hdf_core:libhdf_utils", 50 ] 51} 52 53ohos_systemtest("End2EndTest") { 54 module_out_path = module_output_path 55 sources = [ 56 "//foundation/ai/neural_network_runtime/test/system_test/end_to_end_test.cpp", 57 "//foundation/ai/neural_network_runtime/test/system_test/common/nnrt_test.cpp", 58 ] 59 60 configs = [ ":system_test_config" ] 61 62 deps = [ 63 "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", 64 "//third_party/googletest:gtest_main", 65 ] 66 67 external_deps = [ 68 "hiviewdfx_hilog_native:libhilog", 69 "c_utils:utils", 70 "hitrace_native:libhitracechain", 71 "hitrace_native:hitrace_meter", 72 "drivers_interface_nnrt:libnnrt_proxy_1.0", 73 "hdf_core:libhdf_utils", 74 "mindspore:mindir" 75 ] 76} 77 78ohos_systemtest("StressTest") { 79 module_out_path = module_output_path 80 sources = [ 81 "//foundation/ai/neural_network_runtime/test/system_test/stress_test.cpp", 82 "//foundation/ai/neural_network_runtime/test/system_test/common/nnrt_test.cpp", 83 ] 84 85 configs = [ ":system_test_config" ] 86 87 deps = [ 88 "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", 89 "//third_party/googletest:gtest_main", 90 ] 91 92 external_deps = [ 93 "hiviewdfx_hilog_native:libhilog", 94 "c_utils:utils", 95 "mindspore:mindir" 96 ] 97} 98 99group("system_test") { 100 testonly = true 101 deps = [ 102 ":DeviceTest", 103 ":End2EndTest", 104 ":StressTest" 105 ] 106} 107 108