• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-src/source/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 = [ "./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    "c_utils:utils",
46    "drivers_interface_nnrt:libnnrt_proxy_1.0",
47    "hdf_core:libhdf_utils",
48    "hilog:libhilog",
49    "hitrace:hitrace_meter",
50  ]
51}
52
53ohos_systemtest("End2EndTest") {
54  module_out_path = module_output_path
55  sources = [
56    "./common/nnrt_test.cpp",
57    "./end_to_end_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    "c_utils:utils",
69    "drivers_interface_nnrt:libnnrt_proxy_1.0",
70    "hdf_core:libhdf_utils",
71    "hilog:libhilog",
72    "hitrace:hitrace_meter",
73    "hitrace:libhitracechain",
74    "mindspore:mindir",
75  ]
76}
77
78group("system_test") {
79  testonly = true
80  deps = [
81    ":DeviceTest",
82    ":End2EndTest",
83  ]
84}
85