echo "--artifactpath - (default={test-driver.sh's path}/../../) it should contain tests/ and Product/"
echo ""
echo "Following options are needed when you want to tests of specific types. If you don't pass any one, unittest and verification will be run"
- echo "--unittest - (default=on) run unit test"
echo "--frameworktest - (default=off) run framework test"
echo "--verification - (default=on) run verification"
echo "--frameworktest_list_file - filepath of model list for test"
echo "etc."
echo "--framework_driverbin - (default=../../Product/out/bin/tflite_run) runner for runnning framework tests"
echo "--verification_driverbin - (default=../../Product/out/bin/nnapi_test) runner for runnning verification tests"
- echo "--runtestsh - (default=\$ARTIFACT_PATH/tests/scripts/framework/run_test.sh) run_test.sh with path where it is for framework test and verification"
- echo "--unittestdir - (default=\$ARTIFACT_PATH/Product/out/unittest) directory that has unittest binaries for unit test"
echo ""
echo "--reportdir - (default=\$ARTIFACT_PATH/report) directory to save report"
echo ""
ARTIFACT_PATH="$TEST_DRIVER_DIR/../../"
FRAMEWORK_DRIVER_BIN=""
VERIFICATION_DRIVER_BIN=""
-RUN_TEST_SH=""
-UNIT_TEST_DIR=""
ALLTEST_ON="true"
-UNITTEST_ON="false"
FRAMEWORKTEST_ON="false"
VERIFICATION_ON="false"
BENCHMARK_ONERT_OP_ON="false"
--verification_driverbin=*)
VERIFICATION_DRIVER_BIN=${i#*=}
;;
- --runtestsh=*)
- RUN_TEST_SH=${i#*=}
- ;;
- --unittestdir=*)
- UNIT_TEST_DIR=${i#*=}
- ;;
- --unittest)
- ALLTEST_ON="false"
- UNITTEST_ON="true"
- ;;
--frameworktest)
ALLTEST_ON="false"
FRAMEWORKTEST_ON="true"
ARTIFACT_PATH="$(readlink -f $ARTIFACT_PATH)"
-if [ -z "$RUN_TEST_SH" ]; then
- RUN_TEST_SH=$ARTIFACT_PATH/tests/scripts/framework/run_test.sh
-fi
-
-if [ ! -e "$RUN_TEST_SH" ]; then
- echo "Cannot find $RUN_TEST_SH"
- exit 1
-fi
-
if [ -z "$UNIT_TEST_DIR" ]; then
UNIT_TEST_DIR=$ARTIFACT_PATH/Product/out/unittest
fi
source $TEST_DRIVER_DIR/common.sh
-# Run unittest in each part such as Runtime
-if [ "$ALLTEST_ON" == "true" ] || [ "$UNITTEST_ON" == "true" ]; then
- $TEST_DRIVER_DIR/unittest.sh \
- --reportdir=$REPORT_DIR \
- --unittestdir=$UNIT_TEST_DIR
-fi
-
# Run tflite_run with various tflite models
if [ "$FRAMEWORKTEST_ON" == "true" ]; then
if [ -z "$FRAMEWORK_DRIVER_BIN" ]; then
fi
$TEST_DRIVER_DIR/test_framework.sh \
- --runtestsh=$RUN_TEST_SH \
--driverbin=$FRAMEWORK_DRIVER_BIN \
--reportdir=$REPORT_DIR \
--tapname=framework_test.tap \
# verification uses the same script as frameworktest does
$TEST_DRIVER_DIR/test_framework.sh \
- --runtestsh=$RUN_TEST_SH \
--driverbin=$VERIFICATION_DRIVER_BIN \
--reportdir=$REPORT_DIR \
--tapname=verification_test.tap \
$TEST_DRIVER_DIR/benchmark_nnapi.sh \
--test_op \
- --runtestsh=$RUN_TEST_SH \
--driverbin=$DRIVER_BIN \
--reportdir=$REPORT_DIR/benchmark_op \
- --modelfilepath=$ARTIFACT_PATH/tests/scripts/framework
+ --modelfilepath=$ARTIFACT_PATH/tests/scripts/models
fi
# Make json file. Actually, this process is only needed on CI. That's why it is in test-driver.sh.