From: 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 3 Dec 2019 01:40:57 +0000 (+0900) Subject: [CI/script] Use linux test script on tizen (#9329) X-Git-Tag: submit/tizen/20191205.083104~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3955908ebf5a154ed8bf1db701b135a4430952a7;p=platform%2Fcore%2Fml%2Fnnfw.git [CI/script] Use linux test script on tizen (#9329) Instead of using tizen own test script, share linux test script and remove tizen test script Signed-off-by: Hyeongseok Oh --- diff --git a/infra/scripts/test_tizen_neurun_acl_cl.sh b/infra/scripts/test_tizen_neurun_acl_cl.sh deleted file mode 100755 index 59bf947..0000000 --- a/infra/scripts/test_tizen_neurun_acl_cl.sh +++ /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 index 9e1939b..0000000 --- a/infra/scripts/test_tizen_neurun_mixed.sh +++ /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 diff --git a/infra/scripts/tizen_xu4_test.sh b/infra/scripts/tizen_xu4_test.sh index e5eaa28..f3c9bd5 100755 --- a/infra/scripts/tizen_xu4_test.sh +++ b/infra/scripts/tizen_xu4_test.sh @@ -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}" diff --git a/packaging/nnfw.spec b/packaging/nnfw.spec index 38b59e3..83210ca 100644 --- a/packaging/nnfw.spec +++ b/packaging/nnfw.spec @@ -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