Repository: incubator-reef
Updated Branches:
  refs/heads/master 9b656a202 -> fd18d2f40


[REEF-558] Check and set the environment varible for Mesos native library in 
runmesostests.sh

This pull request addressed the issue by
* Check whether $MESOS_NATIVE_LIBRARY exists or not.
* If the path of MESOS NATIVE LIBRARY is found, set the environent variable.
* If not, give error message.

JIRA: [REEF-558](https://issues.apache.org/jira/browse/REEF-558)

Pull Request:
  This closes #342


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

Branch: refs/heads/master
Commit: fd18d2f40483aa36be50dee58e192b1599f81cb1
Parents: 9b656a2
Author: dongjun-Lee <ga...@snu.ac.kr>
Authored: Thu Aug 6 15:45:11 2015 +0900
Committer: Brian Cho <chobr...@apache.org>
Committed: Wed Aug 12 14:39:38 2015 +0900

----------------------------------------------------------------------
 bin/runmesostests.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/fd18d2f4/bin/runmesostests.sh
----------------------------------------------------------------------
diff --git a/bin/runmesostests.sh b/bin/runmesostests.sh
index 6b52c68..c03b174 100755
--- a/bin/runmesostests.sh
+++ b/bin/runmesostests.sh
@@ -23,6 +23,22 @@ if [ "$#" -ne 1 ]; then
     exit 1
 fi
 
+if [ -z ${MESOS_NATIVE_LIBRARY+x} ]
+then
+  search_paths='/usr/lib /usr/local/lib'
+  echo "MESOS_NATIVE_LIBRARY is not set. Searching in $search_paths.."
+  mesos_native_library=$(find -L $search_paths -name libmesos.dylib -or -name 
libmesos.so | head -n1)
+
+  if [ -z $mesos_native_library ]
+  then
+    echo "MESOS_NATIVE_LIBRARY not found"
+       exit 1
+  else
+    export MESOS_NATIVE_LIBRARY=$mesos_native_library
+    echo "MESOS_NATIVE_LIBRARY set to '$mesos_native_library'"
+  fi
+fi
+
 export REEF_TEST_MESOS=true
 export REEF_TEST_MESOS_MASTER_IP=$1
 

Reply via email to