[CI/script] Use linux test script on tizen (#9329)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 3 Dec 2019 01:40:57 +0000 (10:40 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 3 Dec 2019 01:40:57 +0000 (10:40 +0900)
Instead of using tizen own test script, share linux test script and remove tizen test script

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
infra/scripts/test_tizen_neurun_acl_cl.sh [deleted file]
infra/scripts/test_tizen_neurun_mixed.sh [deleted file]
infra/scripts/tizen_xu4_test.sh
packaging/nnfw.spec

diff --git a/infra/scripts/test_tizen_neurun_acl_cl.sh b/infra/scripts/test_tizen_neurun_acl_cl.sh
deleted file mode 100755 (executable)
index 59bf947..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-[[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo "Please don't source ${BASH_SOURCE[0]}, execute it" && return
-
-CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-ROOT_PATH="$CURRENT_PATH/../../"
-
-set -e
-
-pushd $ROOT_PATH > /dev/null
-
-export BACKENKDS=acl_cl
-
-cp -v ./Product/out/unittest/nnapi_gtest.skip.armv7l-tizen ./Product/out/unittest/nnapi_gtest.skip
-export EXECUTOR=Linear
-source ./tests/scripts/test_driver.sh \
-        --reportdir="$ROOT_PATH/report/acl_cl" .
-
-export EXECUTOR=Dataflow
-source ./tests/scripts/test_driver.sh \
-        --reportdir="$ROOT_PATH/report/acl_cl" .
-
-export EXECUTOR=Parallel
-source ./tests/scripts/test_driver.sh \
-        --reportdir="$ROOT_PATH/report/acl_cl" .
-
-popd > /dev/null
diff --git a/infra/scripts/test_tizen_neurun_mixed.sh b/infra/scripts/test_tizen_neurun_mixed.sh
deleted file mode 100755 (executable)
index 9e1939b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-[[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo "Please don't source ${BASH_SOURCE[0]}, execute it" && return
-
-CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-ROOT_PATH="$CURRENT_PATH/../../"
-
-set -e
-
-pushd $ROOT_PATH > /dev/null
-
-export EXECUTOR=Linear
-
-# NOTE Fixed backend assignment by type of operation
-# TODO Enhance this with randomized test
-BACKENDS=(cpu acl_cl acl_neon)
-export BACKENDS="acl_cl;acl_neon;cpu"
-export OP_BACKEND_Conv2D=cpu
-export OP_BACKEND_MaxPool2D=acl_cl
-export OP_BACKEND_AvgPool2D=acl_neon
-export ACL_LAYOUT=NCHW
-
-# Get the intersect of framework test list files(each backend has a lsit)
-TESTLIST_PREFIX="tests/scripts/neurun_frameworktest_list.armv7l"
-cat $TESTLIST_PREFIX.${BACKENDS[0]}.txt | sort > $TESTLIST_PREFIX.intersect.txt
-for BACKEND in $BACKENDS; do
-    comm -12 <(sort $TESTLIST_PREFIX.intersect.txt) <(sort $TESTLIST_PREFIX.$BACKEND.txt) > $TESTLIST_PREFIX.intersect.next.txt
-    mv $TESTLIST_PREFIX.intersect.next.txt $TESTLIST_PREFIX.intersect.txt
-done
-
-# Run the test
-cp -v ./Product/out/unittest/nnapi_gtest.skip.armv7l-tizen ./Product/out/unittest/nnapi_gtest.skip
-source ./tests/scripts/test_driver.sh \
-        --frameworktest_list_file=$TESTLIST_PREFIX.intersect.txt \
-        --reportdir="$ROOT_PATH/report/mixed" .
-
-popd > /dev/null
index e5eaa28..f3c9bd5 100755 (executable)
@@ -120,8 +120,11 @@ else
 fi
 
 if [ -z "${GCOV_DIR}" ]; then
-  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_tizen_neurun_acl_cl.sh"
-  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_tizen_neurun_mixed.sh"
+  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_acl_cl.sh"
+  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_acl_neon.sh"
+  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_cpu.sh"
+  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_mixed.sh"
+  ${SDB_CMD} shell /bin/bash -c "IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_neurun_interp.sh"
 else
   mkdir -p ${GCOV_DIR}
   rm -rf ${GCOV_DIR}/*
@@ -133,8 +136,11 @@ else
   GCOV_DATA_PATH="/opt/usr/nnfw-gcov"
 
   # TODO For coverage check, we run acl_cl and mixed test
-  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_tizen_neurun_acl_cl.sh"
-  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_tizen_neurun_mixed.sh"
+  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_acl_cl.sh"
+  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_acl_neon.sh"
+  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_cpu.sh"
+  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_arm_neurun_mixed.sh"
+  ${SDB_CMD} shell /bin/bash -c "GCOV_PREFIX_STRIP=${GCOV_PREFIX_STRIP} IGNORE_MD5=1 ${TEST_ROOT}/infra/scripts/test_neurun_interp.sh"
 
   # More test to check coverage
   ${SDB_CMD} shell "rm -rf ${GCOV_DATA_PATH} && mkdir -p ${GCOV_DATA_PATH}"
index 38b59e3..83210ca 100644 (file)
@@ -125,6 +125,9 @@ mkdir -p %{buildroot}%{_libdir}/pkgconfig
 install -m 0644 ./nnfw.pc.in %{buildroot}%{_libdir}/pkgconfig/nnfw.pc
 
 %{test_build_env} ./nnfw install
+# Rename to share test script
+mv %{buildroot}%{test_install_dir}/unittest/nnapi_gtest.skip.armv7l-tizen %{buildroot}%{test_install_dir}/unittest/nnapi_gtest.skip.armv7l-linux
+cp tests/nnapi/nnapi_gtest.skip.armv7l-linux.* %{buildroot}%{test_install_dir}/unittest/.
 tar -zxf test-suite.tar.gz -C %{buildroot}%{test_install_home}
 
 %if %{coverage_build} == 1