diff options
Diffstat (limited to 'tests/framework')
21 files changed, 17 insertions, 22 deletions
diff --git a/tests/framework/run_test.sh b/tests/framework/run_test.sh index a9feaab55..930971534 100755 --- a/tests/framework/run_test.sh +++ b/tests/framework/run_test.sh @@ -36,24 +36,26 @@ function Usage() echo "" } -function verify_downloaded_file() +function need_download() { LOCAL_PATH=$1 REMOTE_URL=$2 - + if [ ! -e $LOCAL_PATH ]; then + return 0; + fi # Ignore checking md5 in cache if [ ! -z $IGNORE_MD5 ] && [ "$IGNORE_MD5" == "1" ]; then - return 0 + return 1 fi LOCAL_HASH=$(md5sum $LOCAL_PATH | awk '{ print $1 }') - REMOTE_HASH=$(curl -I -ss $REMOTE_URL | grep '^Content-MD5' | tr -d '\r\n' | awk '{ print $2 }' | base64 -d | xxd -p) + REMOTE_HASH=$(curl -ss $REMOTE_URL | md5sum | awk '{ print $1 }') # TODO Emit an error when Content-MD5 field was not found. (Server configuration issue) - if [ "$LOCAL_HASH" != "$REMOTE_HASH" ]; then echo "Downloaded file is outdated or incomplete." - return 1 + return 0 fi + return 1 } DRIVER_BIN="" @@ -159,7 +161,7 @@ run_tests() fi # Download unless we have it in cache (Also check md5sum) - if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_URL"; then + if need_download "$MODELFILE" "$MODELFILE_URL"; then echo "" echo "Download test file for $TEST_NAME" echo "======================" @@ -231,7 +233,7 @@ download_tests() fi # Download unless we have it in cache (Also check md5sum) - if [ ! -e $MODELFILE ] || ! verify_downloaded_file "$MODELFILE" "$MODELFILE_URL"; then + if need_download "$MODELFILE" "$MODELFILE_URL"; then echo "" echo "Download test file for $TEST_NAME" echo "======================" diff --git a/tests/framework/tests/MODELS/mobilenet/config.sh b/tests/framework/tests/MODELS/mobilenet/config.sh index b17a3bd54..b23d687cd 100644 --- a/tests/framework/tests/MODELS/mobilenet/config.sh +++ b/tests/framework/tests/MODELS/mobilenet/config.sh @@ -1,3 +1,2 @@ MODELFILE_SERVER_PATH="https://storage.googleapis.com/download.tensorflow.org/models/tflite" MODELFILE_NAME="mobilenet_v1_0.25_128_float_2017_11_08.zip" -STATUS="enabled" diff --git a/tests/framework/tests/concat/2D/config.sh b/tests/framework/tests/concat/2D/config.sh index bb71cad83..fd22e708c 100644 --- a/tests/framework/tests/concat/2D/config.sh +++ b/tests/framework/tests/concat/2D/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="concat_test_2d.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/custom/abs/config.sh b/tests/framework/tests/custom/abs/config.sh new file mode 100644 index 000000000..3030bcb72 --- /dev/null +++ b/tests/framework/tests/custom/abs/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="custom_abs_test.tflite" diff --git a/tests/framework/tests/custom/squared_difference/config.sh b/tests/framework/tests/custom/squared_difference/config.sh new file mode 100644 index 000000000..745a84447 --- /dev/null +++ b/tests/framework/tests/custom/squared_difference/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="custom_squared_diff_test.tflite" diff --git a/tests/framework/tests/custom/tensorflowmax/config.sh b/tests/framework/tests/custom/tensorflowmax/config.sh index 058799935..122c459db 100644 --- a/tests/framework/tests/custom/tensorflowmax/config.sh +++ b/tests/framework/tests/custom/tensorflowmax/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="custom_max_test.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/custom/tensorflowsum/config.sh b/tests/framework/tests/custom/tensorflowsum/config.sh new file mode 100644 index 000000000..0a6dfe348 --- /dev/null +++ b/tests/framework/tests/custom/tensorflowsum/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="custom_sum_test.tflite" diff --git a/tests/framework/tests/exp/config.sh b/tests/framework/tests/exp/config.sh index 47f878783..944f0bbce 100644 --- a/tests/framework/tests/exp/config.sh +++ b/tests/framework/tests/exp/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="exp_4d.tflite" -STATUS="enabled" diff --git a/tests/framework/tests/hashtable_lookup/config.sh b/tests/framework/tests/hashtable_lookup/config.sh index 1176a36f1..3222ee4d2 100644 --- a/tests/framework/tests/hashtable_lookup/config.sh +++ b/tests/framework/tests/hashtable_lookup/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="hashtable_lookup_test1.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/logistic/config.sh b/tests/framework/tests/logistic/config.sh index 456773aa9..632c3629e 100644 --- a/tests/framework/tests/logistic/config.sh +++ b/tests/framework/tests/logistic/config.sh @@ -1 +1,2 @@ MODELFILE_NAME="sigmoid_test.tflite" +STATUS="disabled" diff --git a/tests/framework/tests/neg/config.sh b/tests/framework/tests/neg/config.sh index 8cde1a258..000f7c811 100644 --- a/tests/framework/tests/neg/config.sh +++ b/tests/framework/tests/neg/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="neg_4d.tflite" -STATUS="enabled" diff --git a/tests/framework/tests/pad/pad1/config.sh b/tests/framework/tests/pad/pad1/config.sh index 1c154c1dd..088cd8962 100644 --- a/tests/framework/tests/pad/pad1/config.sh +++ b/tests/framework/tests/pad/pad1/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="pad_test.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/pad/pad2/config.sh b/tests/framework/tests/pad/pad2/config.sh index 6a0b2d30f..1683f5350 100644 --- a/tests/framework/tests/pad/pad2/config.sh +++ b/tests/framework/tests/pad/pad2/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="pad_test2.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/reduce_max/config.sh b/tests/framework/tests/reduce_max/config.sh new file mode 100644 index 000000000..d636b8bd3 --- /dev/null +++ b/tests/framework/tests/reduce_max/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="reduce_max_1d.tflite" diff --git a/tests/framework/tests/reduce_mean/test1/config.sh b/tests/framework/tests/reduce_mean/test1/config.sh index 7884000aa..2f370ea4e 100644 --- a/tests/framework/tests/reduce_mean/test1/config.sh +++ b/tests/framework/tests/reduce_mean/test1/config.sh @@ -1,3 +1 @@ -# REDUCE_MEAN is supported after tensorflow 1.10 MODELFILE_NAME="reduce_mean_test.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/reduce_mean/test2/config.sh b/tests/framework/tests/reduce_mean/test2/config.sh index d9ca89a7a..6c54779a9 100644 --- a/tests/framework/tests/reduce_mean/test2/config.sh +++ b/tests/framework/tests/reduce_mean/test2/config.sh @@ -1,3 +1 @@ -# REDUCE_MEAN is supported after tensorflow 1.10 MODELFILE_NAME="reduce_mean_test_2.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/rsqrt/config.sh b/tests/framework/tests/rsqrt/config.sh index c97f8af6e..87aa85277 100644 --- a/tests/framework/tests/rsqrt/config.sh +++ b/tests/framework/tests/rsqrt/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="rsqrt_4d.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/sub/broadcast/config.sh b/tests/framework/tests/sub/broadcast/config.sh index f61285915..2b1add0e5 100644 --- a/tests/framework/tests/sub/broadcast/config.sh +++ b/tests/framework/tests/sub/broadcast/config.sh @@ -1,2 +1 @@ MODELFILE_NAME="sub_test_broadcast.tflite" -STATUS="disabled" diff --git a/tests/framework/tests/tranpose/config.sh b/tests/framework/tests/transpose/config.sh index 9adb85e70..9adb85e70 100644 --- a/tests/framework/tests/tranpose/config.sh +++ b/tests/framework/tests/transpose/config.sh diff --git a/tests/framework/tests/transpose_conv/same/config.sh b/tests/framework/tests/transpose_conv/same/config.sh new file mode 100644 index 000000000..2cca86e03 --- /dev/null +++ b/tests/framework/tests/transpose_conv/same/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="transpose_conv_test.tflite" diff --git a/tests/framework/tests/transpose_conv/valid/config.sh b/tests/framework/tests/transpose_conv/valid/config.sh new file mode 100644 index 000000000..d162331a3 --- /dev/null +++ b/tests/framework/tests/transpose_conv/valid/config.sh @@ -0,0 +1 @@ +MODELFILE_NAME="transpose_conv_valid_test.tflite" |