Introduce LAYOUT_191215 check (#9326)
author박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 3 Dec 2019 06:28:05 +0000 (15:28 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 3 Dec 2019 06:28:05 +0000 (15:28 +0900)
This commit introduces LAYOUT_191215 check rule.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
infra/packaging/chklist/LAYOUT_191215 [new file with mode: 0644]

diff --git a/infra/packaging/chklist/LAYOUT_191215 b/infra/packaging/chklist/LAYOUT_191215
new file mode 100644 (file)
index 0000000..8095197
--- /dev/null
@@ -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
+}