test: set meta file path accepted/tizen/6.5/unified/20211028.094500 accepted/tizen/unified/20210909.123030 submit/tizen/20210909.010804 submit/tizen_6.5/20211028.161801 tizen_6.5.m2_release
authorInki Dae <inki.dae@samsung.com>
Tue, 7 Sep 2021 07:21:52 +0000 (16:21 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 9 Sep 2021 01:07:39 +0000 (10:07 +0900)
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 <inki.dae@samsung.com>
test/testsuites/machine_learning/inference/test_inference_helper.cpp

index d34d383..1c88689 100644 (file)
@@ -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),