From: Inki Dae Date: Tue, 7 Sep 2021 07:21:52 +0000 (+0900) Subject: test: set meta file path X-Git-Tag: submit/tizen/20210909.010804^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=addec6b4ef42f23feeeb850738840b0f49bccfb6;p=platform%2Fcore%2Fapi%2Fmediavision.git test: set meta file path Since commit-id c4e918cda1ef97fdd5e5cf74dd056b65407ab671, Mediavision needs a json file per a model. This patch makes json file path using a given model file path and sets it in case of reference model. Change-Id: I51c9721fbebeb6c79abeb67faa193b9580bbae95 Signed-off-by: Inki Dae --- diff --git a/test/testsuites/machine_learning/inference/test_inference_helper.cpp b/test/testsuites/machine_learning/inference/test_inference_helper.cpp index d34d383b..1c88689f 100644 --- a/test/testsuites/machine_learning/inference/test_inference_helper.cpp +++ b/test/testsuites/machine_learning/inference/test_inference_helper.cpp @@ -21,6 +21,14 @@ void engine_config_hosted_cpu_tflite(mv_engine_config_h handle, EXPECT_EQ(mv_engine_config_set_string_attribute( handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, tf_weight), MEDIA_VISION_ERROR_NONE); + + std::string meta_file_path = tf_weight; + meta_file_path = meta_file_path.substr(0, meta_file_path.find('.')); + meta_file_path += std::string(".json"); + + EXPECT_EQ(mv_engine_config_set_string_attribute( + handle, MV_INFERENCE_MODEL_META_FILE_PATH , meta_file_path.c_str()), + MEDIA_VISION_ERROR_NONE); EXPECT_EQ(mv_engine_config_set_int_attribute(handle, MV_INFERENCE_BACKEND_TYPE, MV_INFERENCE_BACKEND_TFLITE),