Imported Upstream version 1.8.0
[platform/core/ml/nnfw.git] / tests / scripts / test-driver.sh
index 615fc2c..aa97d95 100755 (executable)
@@ -27,7 +27,6 @@ function Usage()
     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"
@@ -38,8 +37,6 @@ function Usage()
     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 ""
@@ -49,10 +46,7 @@ TEST_DRIVER_DIR="$( cd "$( dirname "${BASH_SOURCE}" )" && pwd )"
 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"
@@ -74,16 +68,6 @@ do
         --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"
@@ -116,15 +100,6 @@ done
 
 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
@@ -135,13 +110,6 @@ 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
@@ -149,7 +117,6 @@ if [ "$FRAMEWORKTEST_ON" == "true" ]; then
     fi
 
     $TEST_DRIVER_DIR/test_framework.sh \
-        --runtestsh=$RUN_TEST_SH \
         --driverbin=$FRAMEWORK_DRIVER_BIN \
         --reportdir=$REPORT_DIR \
         --tapname=framework_test.tap \
@@ -166,7 +133,6 @@ if [ "$ALLTEST_ON" == "true" ] || [ "$VERIFICATION_ON" == "true" ]; then
 
     # 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 \
@@ -180,10 +146,9 @@ if [ "$BENCHMARK_ONERT_OP_ON" == "true" ]; then
 
     $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.