From c2bf32f4cae7b37ccb9bdca201eeed99f9fe454e Mon Sep 17 00:00:00 2001 From: tangshihua Date: Tue, 29 Nov 2022 11:37:13 +0800 Subject: [PATCH] bugfix Signed-off-by: tangshihua --- ai/neural_network_runtime/interface/BUILD.gn | 25 +++++++++++--------- ai/neural_network_runtime/stability/BUILD.gn | 25 +++++++++++--------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/ai/neural_network_runtime/interface/BUILD.gn b/ai/neural_network_runtime/interface/BUILD.gn index e68bce6ef..25b2fbd1a 100644 --- a/ai/neural_network_runtime/interface/BUILD.gn +++ b/ai/neural_network_runtime/interface/BUILD.gn @@ -13,8 +13,19 @@ import("//test/xts/tools/build/suite.gni") +config("nnrt_config") { + include_dirs = [ + "../common", + "//foundation/ai/neural_network_runtime", + "//foundation/ai/neural_network_runtime/third_party/include", + "//third_party/googletest/googletest/include", + "//third_party/googletest/googlemock/include", + "//third_party/mindspore/mindspore/lite/mindir/include", + ] + cflags = [ "-Wno-error" ] +} + ohos_moduletest_suite("ActsAiNnrtFunctionTest") { - testonly = true module_out_path = "acts/nnrt" sources = [ "../common/mock_idevice.cpp", @@ -26,14 +37,8 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") { "src/ModelTest.cpp", ] - include_dirs = [ - "../common", - "//foundation/ai/neural_network_runtime", - "//foundation/ai/neural_network_runtime/third_party/include", - "//third_party/googletest/googletest/include", - "//third_party/googletest/googlemock/include", - "//third_party/mindspore/mindspore/lite/mindir/include", - ] + configs = [ ":nnrt_config" ] + deps = [ "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", "//third_party/googletest:gmock", @@ -53,6 +58,4 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") { subsystem_name = "ai" part_name = "neural_network_runtime" - - cflags = [ "-Wno-error" ] } diff --git a/ai/neural_network_runtime/stability/BUILD.gn b/ai/neural_network_runtime/stability/BUILD.gn index 2fd52a7c5..386e5475a 100644 --- a/ai/neural_network_runtime/stability/BUILD.gn +++ b/ai/neural_network_runtime/stability/BUILD.gn @@ -13,15 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_moduletest_suite("ActsAiNnrtStabilityTest") { - testonly = true - module_out_path = "acts/nnrt" - sources = [ - "../common/mock_idevice.cpp", - "../common/nnrt_utils.cpp", - "src/MultiThreadTest.cpp", - ] - +config("nnrt_config") { include_dirs = [ "../common", "//foundation/ai/neural_network_runtime", @@ -30,6 +22,19 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") { "//third_party/googletest/googlemock/include", "//third_party/mindspore/mindspore/lite/mindir/include", ] + cflags = [ "-Wno-error" ] +} + +ohos_moduletest_suite("ActsAiNnrtStabilityTest") { + module_out_path = "acts/nnrt" + sources = [ + "../common/mock_idevice.cpp", + "../common/nnrt_utils.cpp", + "src/MultiThreadTest.cpp", + ] + + configs = [ ":nnrt_config" ] + deps = [ "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime", "//third_party/googletest:gmock", @@ -49,6 +54,4 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") { subsystem_name = "ai" part_name = "neural_network_runtime" - - cflags = [ "-Wno-error" ] } -- GitLab