[tf2tflite-dredd-pbtxt] adding env vars independent of tfl or circle (#8864)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Fri, 8 Nov 2019 07:31:07 +0000 (16:31 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 8 Nov 2019 07:31:07 +0000 (16:31 +0900)
* [tf2tflite-dredd-pbtxt] adding env vars that will be used by rule-lib.sh

This adds env vars taht will be used by rule-lib.sh.
Currently var naming in rule-lib.sh in dredd-rule-lib has tfl dependency, so it cannot be used with circle.
This new name is to remove the dependency.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* Update compiler/tf2tflite-dredd-pbtxt-test/runner.sh

Co-Authored-By: hyunsik-yoon <hyunsik.yoon@samsung.com>
compiler/tf2tflite-dredd-pbtxt-test/runner.sh

index 9882f11..e44d5be 100755 (executable)
@@ -31,8 +31,7 @@ FAILED=()
 
 pushd "${WORKDIR}"
 
-# loading RULE and functions that checks tflite file
-source rule-lib.sh
+# running each rule file
 
 while [[ $# -ne 0 ]]; do
   PREFIX="$1"; shift
@@ -72,7 +71,15 @@ while [[ $# -ne 0 ]]; do
 
     # Note: turn off 'command printing'. Otherwise printing will be so messy
     set +x
+
+    # set vars required by rule-lib.sh and rule file
+    COMPILED_FILE=${TFLITE_PATH}
+    INSPECT_PROG_PATH=${TFL_INSPECT_PATH}
+    VERIFY_PROG_PATH=${TFL_VERIFY_PATH}
+
+    source rule-lib.sh
     source "${MODEL_RULE_PATH}"
+
     set -x
 
     if [[ $? -eq 0 ]]; then