summaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework')
-rwxr-xr-xtests/framework/run_test.sh33
-rw-r--r--tests/framework/tests/MODELS/inception_nonslim/config.sh1
-rw-r--r--tests/framework/tests/MODELS/inception_slim/config.sh1
-rw-r--r--tests/framework/tests/MODELS/mobilenet/config.sh1
-rw-r--r--tests/framework/tests/batch_to_space_nd2/config.sh1
-rw-r--r--tests/framework/tests/concat/2D/config.sh1
-rw-r--r--tests/framework/tests/custom/abs/config.sh1
-rw-r--r--tests/framework/tests/custom/squared_difference/config.sh1
-rw-r--r--tests/framework/tests/custom/tensorflowmax/config.sh1
-rw-r--r--tests/framework/tests/custom/tensorflowsum/config.sh1
-rw-r--r--tests/framework/tests/exp/config.sh1
-rw-r--r--tests/framework/tests/fullyconnected/matmul2x2/config.sh1
-rw-r--r--tests/framework/tests/hashtable_lookup/config.sh1
-rw-r--r--tests/framework/tests/max/config.sh1
-rw-r--r--tests/framework/tests/min/config.sh1
-rw-r--r--tests/framework/tests/neg/config.sh1
-rw-r--r--tests/framework/tests/pack/config.sh1
-rw-r--r--tests/framework/tests/pad/pad1/config.sh1
-rw-r--r--tests/framework/tests/pad/pad2/config.sh1
-rw-r--r--tests/framework/tests/reduce_max/config.sh1
-rw-r--r--tests/framework/tests/reduce_mean/test1/config.sh2
-rw-r--r--tests/framework/tests/reduce_mean/test2/config.sh2
-rw-r--r--tests/framework/tests/reduce_sum/config.sh1
-rw-r--r--tests/framework/tests/rnn/config.sh1
-rw-r--r--tests/framework/tests/rsqrt/config.sh1
-rw-r--r--tests/framework/tests/slice/config.sh1
-rw-r--r--tests/framework/tests/space_to_batch_nd2/config.sh1
-rw-r--r--tests/framework/tests/sqrt/config.sh1
-rw-r--r--tests/framework/tests/sub/broadcast/config.sh1
-rw-r--r--tests/framework/tests/transpose/config.sh (renamed from tests/framework/tests/tranpose/config.sh)0
-rw-r--r--tests/framework/tests/transpose_conv/same/config.sh1
-rw-r--r--tests/framework/tests/transpose_conv/valid/config.sh1
32 files changed, 26 insertions, 39 deletions
diff --git a/tests/framework/run_test.sh b/tests/framework/run_test.sh
index a9feaab55..84cfa9efd 100755
--- a/tests/framework/run_test.sh
+++ b/tests/framework/run_test.sh
@@ -32,32 +32,32 @@ function Usage()
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 ""
}
-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=""
-NNFW_LD_LIBRARY_PATH=""
TAP_NAME="framework_test.tap"
TEST_LIST=()
DOWNLOAD_MODE="off"
@@ -84,9 +84,6 @@ do
--download=*)
DOWNLOAD_MODE=${i#*=}
;;
- --ldlibrarypath=*)
- NNFW_LD_LIBRARY_PATH=${i#*=}
- ;;
*)
TEST_LIST+=( $i )
;;
@@ -121,12 +118,6 @@ run_tests()
done
echo "======================"
- if [ -z "$NNFW_LD_LIBRARY_PATH" ]; then
- NNFW_LD_LIBRARY_PATH="$NNFW_HOME/Product/out/lib/"
- else
- NNFW_LD_LIBRARY_PATH="$NNFW_LD_LIBRARY_PATH:$NNFW_HOME/Product/out/lib/"
- fi
-
TOTAL_RESULT=0 # 0(normal) or 1(abnormal)
i=0
for TEST_NAME in $SELECTED_TESTS; do
@@ -159,7 +150,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 "======================"
@@ -185,7 +176,7 @@ run_tests()
echo "======================"
# Run driver to test framework
- LD_LIBRARY_PATH="${NNFW_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}" $DRIVER_BIN $MODELFILE
+ $DRIVER_BIN $MODELFILE
#$DRIVER_BIN $MODELFILE
if [[ $? -eq 0 ]]; then
@@ -231,7 +222,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 "======================"
@@ -265,6 +256,8 @@ find_tests()
if [ -d "$DIR" ]; then
TESTS_FOUND=$(find "$DIR" -type f -name 'config.sh' -exec dirname {} \;| sed 's|^./||' | sort)
TESTS_TO_RUN="$TESTS_TO_RUN $TESTS_FOUND"
+ else
+ echo "Test $DIR was not found. This test is not added." 1>&2
fi
done
popd > /dev/null
diff --git a/tests/framework/tests/MODELS/inception_nonslim/config.sh b/tests/framework/tests/MODELS/inception_nonslim/config.sh
index de3fb88c7..39f5d772d 100644
--- a/tests/framework/tests/MODELS/inception_nonslim/config.sh
+++ b/tests/framework/tests/MODELS/inception_nonslim/config.sh
@@ -1,3 +1,2 @@
MODELFILE_SERVER_PATH="https://storage.googleapis.com/download.tensorflow.org/models/tflite"
MODELFILE_NAME="inception_v3_2015_2017_11_10.zip"
-STATUS="disabled"
diff --git a/tests/framework/tests/MODELS/inception_slim/config.sh b/tests/framework/tests/MODELS/inception_slim/config.sh
index 45e44dd5f..1c0cf3ef5 100644
--- a/tests/framework/tests/MODELS/inception_slim/config.sh
+++ b/tests/framework/tests/MODELS/inception_slim/config.sh
@@ -1,3 +1,2 @@
MODELFILE_SERVER_PATH="https://storage.googleapis.com/download.tensorflow.org/models/tflite"
MODELFILE_NAME="inception_v3_slim_2016_android_2017_11_10.zip"
-STATUS="disabled"
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/batch_to_space_nd2/config.sh b/tests/framework/tests/batch_to_space_nd2/config.sh
new file mode 100644
index 000000000..1dbcb7681
--- /dev/null
+++ b/tests/framework/tests/batch_to_space_nd2/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="batch_to_space_nd2.tflite"
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/fullyconnected/matmul2x2/config.sh b/tests/framework/tests/fullyconnected/matmul2x2/config.sh
index 23226e470..91fd2ffce 100644
--- a/tests/framework/tests/fullyconnected/matmul2x2/config.sh
+++ b/tests/framework/tests/fullyconnected/matmul2x2/config.sh
@@ -1,5 +1,4 @@
MODELFILE_NAME="matmul2x2.tflite"
-STATUS="disabled"
# this tflite is matmul (2x2 input, 2x2 const tensor)
# the second 2x2 const tensor is [[1.1, 2.1],[3.1, 4.1]]
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/max/config.sh b/tests/framework/tests/max/config.sh
new file mode 100644
index 000000000..479ca7fd0
--- /dev/null
+++ b/tests/framework/tests/max/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="maximum_test.tflite"
diff --git a/tests/framework/tests/min/config.sh b/tests/framework/tests/min/config.sh
new file mode 100644
index 000000000..8148471a5
--- /dev/null
+++ b/tests/framework/tests/min/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="minimum_test.tflite"
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/pack/config.sh b/tests/framework/tests/pack/config.sh
new file mode 100644
index 000000000..162ec9d9d
--- /dev/null
+++ b/tests/framework/tests/pack/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="pack_4d.tflite"
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/reduce_sum/config.sh b/tests/framework/tests/reduce_sum/config.sh
new file mode 100644
index 000000000..31b185397
--- /dev/null
+++ b/tests/framework/tests/reduce_sum/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="reduce_sum.tflite"
diff --git a/tests/framework/tests/rnn/config.sh b/tests/framework/tests/rnn/config.sh
index 6fa93ebb0..997d6c138 100644
--- a/tests/framework/tests/rnn/config.sh
+++ b/tests/framework/tests/rnn/config.sh
@@ -1,2 +1 @@
MODELFILE_NAME="rnn_basic_test1.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/slice/config.sh b/tests/framework/tests/slice/config.sh
new file mode 100644
index 000000000..12d06e977
--- /dev/null
+++ b/tests/framework/tests/slice/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="slice_test.tflite"
diff --git a/tests/framework/tests/space_to_batch_nd2/config.sh b/tests/framework/tests/space_to_batch_nd2/config.sh
new file mode 100644
index 000000000..81933709e
--- /dev/null
+++ b/tests/framework/tests/space_to_batch_nd2/config.sh
@@ -0,0 +1 @@
+MODELFILE_NAME="space_to_batch_nd2.tflite"
diff --git a/tests/framework/tests/sqrt/config.sh b/tests/framework/tests/sqrt/config.sh
index cf3bf19fa..220147238 100644
--- a/tests/framework/tests/sqrt/config.sh
+++ b/tests/framework/tests/sqrt/config.sh
@@ -1,2 +1 @@
MODELFILE_NAME="sqrt_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"