summaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-09-05 15:19:55 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2019-09-05 15:19:55 +0900
commit7a18a62198c46fa037c6011a3774f3001d3a2a24 (patch)
tree33103fb625ff94b8dc079611d72dced7cd902d4f /infra
parentc30177cb2cdcfd8279cb705fa6c1a67a6a2c68d5 (diff)
downloadnnfw-7a18a62198c46fa037c6011a3774f3001d3a2a24.tar.gz
nnfw-7a18a62198c46fa037c6011a3774f3001d3a2a24.tar.bz2
nnfw-7a18a62198c46fa037c6011a3774f3001d3a2a24.zip
Scripts to make nnpkg testsuite and test (#7199)
- Introduce script to make nnpkg testsuite in CI build server - Introduce script to test nnpkg testsuite in xu4 farm Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'infra')
-rwxr-xr-xinfra/scripts/build_nnpkg.sh19
-rwxr-xr-xinfra/scripts/test_arm_nnpkg.sh24
2 files changed, 43 insertions, 0 deletions
diff --git a/infra/scripts/build_nnpkg.sh b/infra/scripts/build_nnpkg.sh
new file mode 100755
index 000000000..221c7210f
--- /dev/null
+++ b/infra/scripts/build_nnpkg.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Test suite: nnpkg-test-suite.tar.gz
+
+[[ "${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}/../../"
+
+pushd ${ROOT_PATH} > /dev/null
+
+for f in `find build/compiler/tf2tflite -name "UNIT*" | cut -d'.' -f1 | sort | uniq`;
+do
+ tools/nnpackage_tool/nncc-tc-to-nnpkg-tc/nncc-tc-to-nnpkg-tc.sh -o nnpkg-tcs -i ${f%/*} $(basename $f);
+done
+
+tar -zcf nnpkg-test-suite.tar.gz tools/nnpackage_tool/nnpkg_test nnpkg-tcs
+
+popd > /dev/null
diff --git a/infra/scripts/test_arm_nnpkg.sh b/infra/scripts/test_arm_nnpkg.sh
new file mode 100755
index 000000000..23759a319
--- /dev/null
+++ b/infra/scripts/test_arm_nnpkg.sh
@@ -0,0 +1,24 @@
+#!/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}/../../"
+
+pushd ${ROOT_PATH} > /dev/null
+
+EXITCODE=0
+PKG_LIST=$(cat tools/nnpackage_tool/nnpkg_test/list)
+for f in ${PKG_LIST}
+do
+ tools/nnpackage_tool/nnpkg_test/nnpkg_test.sh -d -i nnpkg-tcs $f
+ EXITCODE_F=$?
+
+ if [ ${EXITCODE_F} -ne 0 ]; then
+ EXITCODE=${EXITCODE_F}
+ fi
+done
+
+popd > /dev/null
+
+exit ${EXITCODE}