From c5ea86af7e6b543e785430ec4bb219223df67c08 Mon Sep 17 00:00:00 2001 From: Zhu Guodong Date: Tue, 13 Jun 2023 14:08:02 +0800 Subject: [PATCH] change mindspore ndk target Signed-off-by: Zhu Guodong Change-Id: I0bfb3669ae0e9a96709af6b0dce9623e5b23e762 --- ai/mindspore/mindsporectest/BUILD.gn | 2 +- ai/mindspore/mindsporectest/Test.json | 15 ++++++++++++++- .../mindsporectest/src/ohos_c_api_test_mslite.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ai/mindspore/mindsporectest/BUILD.gn b/ai/mindspore/mindsporectest/BUILD.gn index dc47d8aaf..eaf1b3d01 100644 --- a/ai/mindspore/mindsporectest/BUILD.gn +++ b/ai/mindspore/mindsporectest/BUILD.gn @@ -32,7 +32,7 @@ ohos_moduletest_suite("ActsMindSporeTest") { deps = [ "//third_party/googletest:gmock", "//third_party/googletest:gtest", - "//third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_lib", + "//third_party/mindspore/mindspore-src/source/mindspore/lite:mindspore_ndk", ] subsystem_name = "ai" diff --git a/ai/mindspore/mindsporectest/Test.json b/ai/mindspore/mindsporectest/Test.json index 7732b5e60..3ef532f71 100644 --- a/ai/mindspore/mindsporectest/Test.json +++ b/ai/mindspore/mindsporectest/Test.json @@ -43,6 +43,19 @@ "resource/ai/mindspore/ml_headpose_pb2tflite/ml_headpose_pb2tflite_2.input -> /data/test", "resource/ai/mindspore/ml_headpose_pb2tflite/ml_headpose_pb2tflite0.output -> /data/test" ] + }, + { + "type": "ShellKit", + "run-command": [ + "mount -o rw,remount /", + "[ -d '/system/lib' ] && cp /system/lib/ndk/libmindspore_lite_ndk.so /system/lib/platformsdk/", + "[ -d '/system/lib64' ] && cp /system/lib64/ndk/libmindspore_lite_ndk.so /system/lib64/platformsdk/" + ], + "teardown-command": [ + "[ -d '/system/lib' ] && cp /system/lib64/platformsdk/libmindspore_lite_ndk.so", + "[ -d '/system/lib64' ] && cp /system/lib64/platformsdk/libmindspore_lite_ndk.so", + "mount -o ro,remount /" + ] } -] + ] } diff --git a/ai/mindspore/mindsporectest/src/ohos_c_api_test_mslite.cpp b/ai/mindspore/mindsporectest/src/ohos_c_api_test_mslite.cpp index 3080e7f11..305db7639 100644 --- a/ai/mindspore/mindsporectest/src/ohos_c_api_test_mslite.cpp +++ b/ai/mindspore/mindsporectest/src/ohos_c_api_test_mslite.cpp @@ -1561,7 +1561,7 @@ HWTEST(MSLiteTest, OHOS_Input_0003, Function | MediumTest | Level1) { printf("==========ReadFile==========\n"); size_t size1; size_t *ptr_size1 = &size1; - const char *imagePath = "/data/test/aiy_vision_classifier_plants_V1_3_0.input"; + const char *imagePath = "/data/test/aiy_vision_classifier_plants_V1_3.input"; char *imageBuf = ReadFile(imagePath, ptr_size1); ASSERT_NE(imageBuf, nullptr); printf("==========Init Context==========\n"); -- GitLab