summaryrefslogtreecommitdiff
path: root/infra/packaging/chklist
diff options
context:
space:
mode:
Diffstat (limited to 'infra/packaging/chklist')
-rw-r--r--infra/packaging/chklist/LAYOUT_19111547
-rw-r--r--infra/packaging/chklist/LAYOUT_19121539
-rw-r--r--infra/packaging/chklist/TF2CIRCLE_EXIST13
-rw-r--r--infra/packaging/chklist/TF2CIRCLE_RUNNABLE16
-rw-r--r--infra/packaging/chklist/TF2NNPKG_EXIST13
-rw-r--r--infra/packaging/chklist/TF2TFLITE_EXIST13
-rw-r--r--infra/packaging/chklist/TF2TFLITE_RUNNABLE13
7 files changed, 154 insertions, 0 deletions
diff --git a/infra/packaging/chklist/LAYOUT_191115 b/infra/packaging/chklist/LAYOUT_191115
new file mode 100644
index 000000000..e041a2c80
--- /dev/null
+++ b/infra/packaging/chklist/LAYOUT_191115
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# Check whether the package has the following layout:
+#
+# bin/
+# model2nnpkg.sh
+# tf2circle
+# tf2nnpkg
+# tf2tflite
+# tflite2circle.sh
+# tflitejson2circlejson.py
+# lib/
+# libexo.so
+# liblocoex_customop.so
+# libloco.so
+# libmoco_import.so
+# libmoco_lang.so
+# libmoco_log.so
+# libmoco_pass.so
+# libmoco_service.so
+# libmoco_support.so
+# libmoco_tf_frontend.so
+# res/
+# circle_schema.fbs
+# tflite_schema.fbs
+
+function prepare()
+{
+ export QUESTION="Is compatible with the 2019/11/15 layout?"
+}
+
+function run()
+{
+ # The result of running "find . -print | sort | tr -d '\n\0'" from the expected package
+ EXPECTED="."
+ EXPECTED+="./bin./bin/model2nnpkg.sh./bin/tf2circle./bin/tf2nnpkg./bin/tf2tflite./bin/tflite2circle.sh"
+ EXPECTED+="./bin/tflitejson2circlejson.py./lib./lib/libexo.so./lib/liblocoex_customop.so./lib/libloco.so"
+ EXPECTED+="./lib/libmoco_import.so./lib/libmoco_lang.so./lib/libmoco_log.so./lib/libmoco_pass.so"
+ EXPECTED+="./lib/libmoco_service.so./lib/libmoco_support.so./lib/libmoco_tf_frontend.so./res"
+ EXPECTED+="./res/circle_schema.fbs./res/tflite_schema.fbs"
+
+ OBTAINED=$(cd "${NNAS_INSTALL_PREFIX}" && find . -print | sort | tr -d '\n\0')
+
+ if [[ "${OBTAINED}" = "${EXPECTED}" ]]; then
+ export PASSED=1
+ fi
+}
diff --git a/infra/packaging/chklist/LAYOUT_191215 b/infra/packaging/chklist/LAYOUT_191215
new file mode 100644
index 000000000..8095197f6
--- /dev/null
+++ b/infra/packaging/chklist/LAYOUT_191215
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Check whether the package has the following layout:
+#
+# bin/
+# model2nnpkg.sh
+# tf2circle
+# tf2nnpkg
+# lib/
+# libexo.so
+# liblocoex_customop.so
+# libloco.so
+# libmoco_import.so
+# libmoco_lang.so
+# libmoco_log.so
+# libmoco_pass.so
+# libmoco_service.so
+# libmoco_support.so
+# libmoco_tf_frontend.so
+
+function prepare()
+{
+ export QUESTION="Is compatible with the 2019/12/15 layout?"
+}
+
+function run()
+{
+ # The result of running "find . -print | sort | tr -d '\n\0'" from the expected package
+ EXPECTED="."
+ EXPECTED+="./bin./bin/model2nnpkg.sh./bin/tf2circle./bin/tf2nnpkg"
+ EXPECTED+="./lib./lib/libexo.so./lib/liblocoex_customop.so"
+ EXPECTED+="./lib/libloco.so./lib/libmoco_import.so./lib/libmoco_lang.so./lib/libmoco_log.so./lib/libmoco_pass.so./lib/libmoco_service.so./lib/libmoco_support.so./lib/libmoco_tf_frontend.so"
+
+ OBTAINED=$(cd "${NNAS_INSTALL_PREFIX}" && find . -print | sort | tr -d '\n\0')
+
+ if [[ "${OBTAINED}" = "${EXPECTED}" ]]; then
+ export PASSED=1
+ fi
+}
diff --git a/infra/packaging/chklist/TF2CIRCLE_EXIST b/infra/packaging/chklist/TF2CIRCLE_EXIST
new file mode 100644
index 000000000..b0834fc27
--- /dev/null
+++ b/infra/packaging/chklist/TF2CIRCLE_EXIST
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function prepare()
+{
+ export QUESTION="Is there tf2circle?"
+}
+
+function run()
+{
+ if [[ -f "${NNAS_INSTALL_PREFIX}/bin/tf2circle" ]]; then
+ export PASSED=1
+ fi
+}
diff --git a/infra/packaging/chklist/TF2CIRCLE_RUNNABLE b/infra/packaging/chklist/TF2CIRCLE_RUNNABLE
new file mode 100644
index 000000000..597778ff4
--- /dev/null
+++ b/infra/packaging/chklist/TF2CIRCLE_RUNNABLE
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+function prepare()
+{
+ export QUESTION="Is it possible to run tf2circle?"
+}
+
+function run()
+{
+ BIN="${NNAS_INSTALL_PREFIX}/bin/tf2circle"
+ if [[ -f "${BIN}" ]]; then
+ if [[ $(ldd -r "${BIN}" | grep '^undefined' | wc -l) -eq 0 ]]; then
+ export PASSED=1
+ fi
+ fi
+}
diff --git a/infra/packaging/chklist/TF2NNPKG_EXIST b/infra/packaging/chklist/TF2NNPKG_EXIST
new file mode 100644
index 000000000..bbe9a3157
--- /dev/null
+++ b/infra/packaging/chklist/TF2NNPKG_EXIST
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function prepare()
+{
+ export QUESTION="Is there tf2nnpkg?"
+}
+
+function run()
+{
+ if [[ -f "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg" ]]; then
+ export PASSED=1
+ fi
+}
diff --git a/infra/packaging/chklist/TF2TFLITE_EXIST b/infra/packaging/chklist/TF2TFLITE_EXIST
new file mode 100644
index 000000000..1a1c65cbc
--- /dev/null
+++ b/infra/packaging/chklist/TF2TFLITE_EXIST
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function prepare()
+{
+ export QUESTION="Is there tf2tflite?"
+}
+
+function run()
+{
+ if [[ -f "${NNAS_INSTALL_PREFIX}/bin/tf2tflite" ]]; then
+ export PASSED=1
+ fi
+}
diff --git a/infra/packaging/chklist/TF2TFLITE_RUNNABLE b/infra/packaging/chklist/TF2TFLITE_RUNNABLE
new file mode 100644
index 000000000..4c1239c33
--- /dev/null
+++ b/infra/packaging/chklist/TF2TFLITE_RUNNABLE
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function prepare()
+{
+ export QUESTION="Is it possible to run tf2tflite?"
+}
+
+function run()
+{
+ if [[ $(ldd -r "${NNAS_INSTALL_PREFIX}/bin/tf2tflite" | grep '^undefined' | wc -l) -eq 0 ]]; then
+ export PASSED=1
+ fi
+}