diff options
author | 오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com> | 2018-09-11 10:02:14 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2018-09-11 10:02:14 +0900 |
commit | caf61f73d3468db4c6d52d703f6f8df2d65d98a4 (patch) | |
tree | 63d9f6d08a08a06c5596bee94e9456fc8191eb74 /tests | |
parent | 033e78e80ce2d6feb2aaabbe389127b16c51d15c (diff) | |
download | nnfw-caf61f73d3468db4c6d52d703f6f8df2d65d98a4.tar.gz nnfw-caf61f73d3468db4c6d52d703f6f8df2d65d98a4.tar.bz2 nnfw-caf61f73d3468db4c6d52d703f6f8df2d65d98a4.zip |
Parameter to set mirror sever (#2652)
Add new parameter in run_test.sh to set model file's mirror server
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/framework/run_test.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/framework/run_test.sh b/tests/framework/run_test.sh index 516e06236..e7cceb5c6 100755 --- a/tests/framework/run_test.sh +++ b/tests/framework/run_test.sh @@ -33,6 +33,7 @@ function Usage() 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 "--mirrorserver - (default={not used}) mirror server to download model files" echo "" } @@ -56,6 +57,7 @@ NNFW_LD_LIBRARY_PATH="" TAP_NAME="framework_test.tap" TEST_LIST=() DOWNLOAD_MODE="off" +MIRROR_MODELFILE_SERVER="" for i in "$@" do case $i in @@ -78,6 +80,9 @@ do --ldlibrarypath=*) NNFW_LD_LIBRARY_PATH=${i#*=} ;; + --mirrorserver=*) + MIRROR_MODELFILE_SERVER=${i#*=} + ;; *) TEST_LIST+=( $i ) ;; @@ -136,6 +141,10 @@ run_tests() TEST_CACHE_PATH=$CACHE_ROOT_PATH/$TEST_NAME MODELFILE=$TEST_CACHE_PATH/$MODELFILE_NAME + MODELFILE_URL="$MODELFILE_SERVER/$MODELFILE_NAME" + if [ -n "$MIRROR_MODELFILE_SERVER" ]; then + MODELFILE_URL="$MIRROR_MODELFILE_SERVER/$MODELFILE_NAME" + fi # Download model file if [ ! -e $TEST_CACHE_PATH ]; then @@ -143,14 +152,14 @@ run_tests() fi # Download unless we have it in cache (Also check md5sum) - if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_SERVER/$MODELFILE_NAME"; then + if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_URL"; then echo "" echo "Download test file for $TEST_NAME" echo "======================" rm -f $MODELFILE # Remove invalid file if exists pushd $TEST_CACHE_PATH - wget -nv $MODELFILE_SERVER/$MODELFILE_NAME + wget -nv $MODELFILE_URL popd fi @@ -191,6 +200,10 @@ download_tests() TEST_CACHE_PATH=$CACHE_ROOT_PATH/$TEST_NAME MODELFILE=$TEST_CACHE_PATH/$MODELFILE_NAME + MODELFILE_URL="$MODELFILE_SERVER/$MODELFILE_NAME" + if [ -n "$MIRROR_MODELFILE_SERVER" ]; then + MODELFILE_URL="$MIRROR_MODELFILE_SERVER/$MODELFILE_NAME" + fi # Download model file if [ ! -e $TEST_CACHE_PATH ]; then @@ -198,14 +211,14 @@ download_tests() fi # Download unless we have it in cache (Also check md5sum) - if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_SERVER/$MODELFILE_NAME"; then + if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_URL"; then echo "" echo "Download test file for $TEST_NAME" echo "======================" rm -f $MODELFILE # Remove invalid file if exists pushd $TEST_CACHE_PATH - wget -nv $MODELFILE_SERVER/$MODELFILE_NAME + wget -nv $MODELFILE_URL popd fi |