MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+NNFW_HOME="$(dirname $(dirname ${MY_PATH}))"
CACHE_ROOT_PATH=$MY_PATH/"cache"
TEST_ROOT_PATH=$MY_PATH/"tests"
REPORT_DIR="report"
echo "--driverbin - (default=../../Product/out/bin/tflite_run) runner for runnning framework tests"
echo "--reportdir - (default=report) directory to place tap files"
echo "--tapname - (default=framework_test.tap) file name to be written for tap"
+ echo "--ldlibrarypath - (default=${NNFW_HOME}/Product/out/lib) path to '*.so' files"
echo ""
}
DRIVER_BIN=""
+NNFW_LD_LIBRARY_PATH=""
TAP_NAME="framework_test.tap"
TEST_LIST=()
DOWNLOAD_MODE="off"
--download=*)
DOWNLOAD_MODE=${i#*=}
;;
+ --ldlibrarypath=*)
+ NNFW_LD_LIBRARY_PATH=${i#*=}
+ ;;
*)
TEST_LIST+=( $i )
;;
fi
if [ ! -n "$DRIVER_BIN" ]; then
- DRIVER_BIN=$MY_PATH/"../../Product/out/bin/tflite_run"
+ DRIVER_BIN="$NNFW_HOME/Product/out/bin/tflite_run"
fi
# Check test driver setting
echo "Run $TEST_NAME"
echo "======================"
# Run driver to test framework
- $DRIVER_BIN $MODELFILE
+ LD_LIBRARY_PATH="${NNFW_LD_LIBRARY_PATH:=$NNFW_HOME/Product/out/lib}:${LD_LIBRARY_PATH}" $DRIVER_BIN $MODELFILE
RESULT=$?
if [[ $RESULT -eq 0 ]]; then
echo "ok $i - $TEST_NAME" >> $REPORT_DIR/$TAP_NAME