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 MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
29 echo " --driverbin=Product/out/bin/tflite_run \\ # Test driver path"
30 echo " --frameworktest_list_file=tests/scripts/list/frameworktest_list.armv7l.cpu.txt \\"
31 echo " --reportdir=report \\ # Directory for the report files will be saved"
32 echo " --tapname=framework_test.tap \\ # Tap file name"
33 echo " --logname=framework_test.log \\ # Log file name"
34 echo " --testname=Frameworktest # Name of the test just a label of tests"
46 FWTEST_DRIVER_BIN=${i#*=}
49 FWTEST_REPORT_DIR=${i#*=}
52 FWTEST_TAP_NAME=${i#*=}
55 FWTEST_LOG_NAME=${i#*=}
58 FWTEST_TEST_NAME=${i#*=}
60 --frameworktest_list_file=*)
61 FRAMEWORKTEST_LIST_FILE=${i#*=}
67 [ ! -z "$FWTEST_DRIVER_BIN" ] || Usage
68 [ ! -z "$FWTEST_REPORT_DIR" ] || Usage
69 [ ! -z "$FWTEST_TAP_NAME" ] || Usage
70 [ ! -z "$FWTEST_LOG_NAME" ] || Usage
71 [ ! -z "$FWTEST_TEST_NAME" ] || Usage
73 if [ ! -e "$FWTEST_REPORT_DIR" ]; then
74 mkdir -p $FWTEST_REPORT_DIR
78 echo "============================================"
79 echo "$FWTEST_TEST_NAME with $(basename $FWTEST_DRIVER_BIN) ..."
81 if [ ! -z "$FRAMEWORKTEST_LIST_FILE" ]; then
82 MODELLIST=$(cat "${FRAMEWORKTEST_LIST_FILE}")
85 $MY_PATH/models/run_test.sh --driverbin=$FWTEST_DRIVER_BIN \
86 --reportdir=$FWTEST_REPORT_DIR \
87 --tapname=$FWTEST_TAP_NAME \
89 > $FWTEST_REPORT_DIR/$FWTEST_LOG_NAME 2>&1
91 if [[ $FWTEST_RESULT -ne 0 ]]; then
93 cat $FWTEST_REPORT_DIR/$FWTEST_TAP_NAME
95 echo "$FWTEST_TEST_NAME failed... exit code: $FWTEST_RESULT"
96 echo "============================================"
102 cat $FWTEST_REPORT_DIR/$FWTEST_TAP_NAME
103 echo "============================================"