Introduce 'test' command (#81)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 17 Apr 2018 02:22:09 +0000 (11:22 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 17 Apr 2018 02:22:09 +0000 (11:22 +0900)
This commit introduces 'test' command for 'nncc' driver which invokes
tests managed by CMake.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
scripts/command/test [new file with mode: 0644]

diff --git a/scripts/command/test b/scripts/command/test
new file mode 100644 (file)
index 0000000..3b24187
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+source "${NNCC_SCRIPT_PATH}/build.configuration"
+
+BUILD_WORKSPACE_PATH="${NNCC_PROJECT_PATH}/${BUILD_WORKSPACE_RPATH}"
+
+if [[ ! -d "${BUILD_WORKSPACE_PATH}" ]]; then
+  echo "'${BUILD_WORKSPACE_RPATH}' does not exist. Please run 'configure' first"
+  exit 255
+fi
+
+cd "${BUILD_WORKSPACE_PATH}"
+make test