celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-408: Adds the option the DEBUG_OPTS (e.g. valgrind) to deployments using the runtime
Date Thu, 22 Jun 2017 10:48:49 GMT
Repository: celix
Updated Branches:
  refs/heads/develop e17228813 -> a2f06474a


CELIX-408: Adds the option the DEBUG_OPTS (e.g. valgrind) to deployments using the runtime


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a2f06474
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a2f06474
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a2f06474

Branch: refs/heads/develop
Commit: a2f06474a9e391124a2133101fe9548c00b4b11c
Parents: e172288
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Thu Jun 22 12:48:06 2017 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Thu Jun 22 12:48:06 2017 +0200

----------------------------------------------------------------------
 cmake/cmake_celix/Runtimes.cmake       |  1 +
 cmake/cmake_celix/runtime_common.sh.in | 12 +++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/a2f06474/cmake/cmake_celix/Runtimes.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Runtimes.cmake b/cmake/cmake_celix/Runtimes.cmake
index cdb36c1..7665527 100644
--- a/cmake/cmake_celix/Runtimes.cmake
+++ b/cmake/cmake_celix/Runtimes.cmake
@@ -129,6 +129,7 @@ function(runtime_deployments)
         set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_DEPLOYMENT_${DEPLOYMENT}_ID"
"${DEP_ID}")
         list(APPEND DEPLOYMENTS "DEPLOYMENT_NAMES[${DEP_ID}]=\"$<TARGET_PROPERTY:${DEPLOYMENT},DEPLOY_NAME>\"")
         list(APPEND DEPLOYMENTS "DEPLOYMENT_DIRS[${DEP_ID}]=\"$<TARGET_PROPERTY:${DEPLOYMENT},DEPLOY_LOCATION>\"")
+	list(APPEND DEPLOYMENTS "DEPLOYMENT_DEBUG_OPTS[${DEP_ID}]=\"\${${DEPLOYMENT}_DEBUG_OPTS:-}\"")
         set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_NEXT_DEPLOYMENT_ID" "${DEP_ID}")
    endforeach()
 

http://git-wip-us.apache.org/repos/asf/celix/blob/a2f06474/cmake/cmake_celix/runtime_common.sh.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/runtime_common.sh.in b/cmake/cmake_celix/runtime_common.sh.in
index 1a0121c..bc01470 100644
--- a/cmake/cmake_celix/runtime_common.sh.in
+++ b/cmake/cmake_celix/runtime_common.sh.in
@@ -80,6 +80,8 @@ function rt_run_deployment() {
     DEPLOYMENT_DIR=${DEPLOYMENT_DIRS[${INDEX}]}
     ARGS=${DEPLOYMENT_ARGUMENTS[${INDEX}]}
     LOG_FILE="${RUNTIME_DIR}/logs/${DEPLOYMENT}.log"
+    DEBUG_OPTS=${DEPLOYMENT_DEBUG_OPTS[${INDEX}]}
+
     echo ""
     echo "Starting deployment ${DEPLOYMENT}"
     cd ${DEPLOYMENT_DIR}
@@ -89,20 +91,20 @@ function rt_run_deployment() {
     fi
     . ./release.sh #run deployment release
     echo "  Workdir: ${DEPLOYMENT_DIR}"
-    echo "  Cmd used: './${DEPLOYMENT} ${ARGS}'"
+    echo "  Cmd used: '${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS}'"
     if [ "${USE_TERM}" = "TRUE" ] ; then
         if [ "${LOG_TO_FILES}" = "TRUE" ] ; then
             echo "  Using log file ${LOG_FILE}"
-            ${TERM_CMD} ${TERM_OPTS} -e "./${DEPLOYMENT} ${ARGS} &> ${LOG_FILE}" 
&> /dev/null &
+            ${TERM_CMD} ${TERM_OPTS} -e "${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS} &>
${LOG_FILE}"  &> /dev/null &
         else
-            ${TERM_CMD} ${TERM_OPTS} -e "./${DEPLOYMENT} ${ARGS}" &> /dev/null &
+            ${TERM_CMD} ${TERM_OPTS} -e "${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS}" &>
/dev/null &
         fi
     else #run in this shell
         if [ "${LOG_TO_FILES}" = "TRUE" ] ; then
             echo "  Using log file ${LOG_FILE}"
-            ./${DEPLOYMENT} ${ARGS} &> ${LOG_FILE} &
+            ${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS} &> ${LOG_FILE} &
         else
-            ./${DEPLOYMENT} ${ARGS} &
+            ${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS} &
         fi
     fi
     PID=$!


Mime
View raw message