[tf2tflite] Test script runnable from any directory (#6514)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Tue, 13 Aug 2019 01:41:07 +0000 (10:41 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 13 Aug 2019 01:41:07 +0000 (10:41 +0900)
Previously test script partially assumes it runs on WORKDIR, which makes
no harm at all. This commit just explicitly call file path including WORKDIR
to be matched with other lines convention and to be runnable from any directory.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
compiler/tf2tflite/testall.sh

index f92c9ed..ff18b60 100755 (executable)
@@ -65,18 +65,18 @@ while [[ $# -ne 0 ]]; do
       --backend-arg "${WORKDIR}/${PREFIX}.info" \
       --pre "${RANDOMIZE_ACTION_PATH}" \
       --pre "${HDF5_EXPORT_ACTION_PATH}" \
-      --pre-arg "${PREFIX}.input.h5" \
+      --pre-arg "${WORKDIR}/${PREFIX}.input.h5" \
       --post "${HDF5_EXPORT_ACTION_PATH}" \
-      --post-arg "${PREFIX}.expected.h5"
+      --post-arg "${WORKDIR}/${PREFIX}.expected.h5"
 
     # Run TensorFlow Lite
     "${NNKIT_RUN_PATH}" \
       --backend "${TFLITE_BACKEND_PATH}" \
       --backend-arg "${WORKDIR}/${PREFIX}.tflite" \
       --pre "${HDF5_IMPORT_ACTION_PATH}" \
-      --pre-arg "${PREFIX}.input.h5" \
+      --pre-arg "${WORKDIR}/${PREFIX}.input.h5" \
       --post "${HDF5_EXPORT_ACTION_PATH}" \
-      --post-arg "${PREFIX}.obtained.h5"
+      --post-arg "${WORKDIR}/${PREFIX}.obtained.h5"
 
     "${I5DIFF_PATH}" -d 0.001 "${PREFIX}.expected.h5" "${PREFIX}.obtained.h5"