3 # Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 COMMAND_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18 INSTALL_DIR="$(dirname $(dirname $COMMAND_DIR))"
25 echo "Usage: $0 $(basename ${BASH_SOURCE[0]}) [OPTIONS]"
28 echo " --ignoremd5 Ignore MD5 check when download model files"
29 echo " --model=(all|nnpackage|tflite) Download test model (default=all)"
43 DOWNLOAD_MODEL=${i#*=}
46 echo "Unknown option: $i"
53 if [[ $DOWNLOAD_MODEL == "all" ]] || [[ $DOWNLOAD_MODEL == "tflite" ]]; then
54 # Download tflite models
55 $INSTALL_DIR/test/models/run_test.sh --download=on --run=off --md5=$MD5_CHECK
58 if [[ $DOWNLOAD_MODEL == "all" ]] || [[ $DOWNLOAD_MODEL == "nnpackage" ]]; then
59 # Download nnpackage model
60 NNPACKAGE_CONFIG_DIR=$INSTALL_DIR/test/models/nnpackage/
61 NNPACKAGE_CACHE_DIR=$INSTALL_DIR/unittest_standalone/nnfw_api_gtest_models/
62 $INSTALL_DIR/test/models/run_test.sh --download=on --run=off --md5=$MD5_CHECK \
63 --configdir=$NNPACKAGE_CONFIG_DIR --cachedir=$NNPACKAGE_CACHE_DIR