CTR: added another script evaluation test in `validate-distribution.sh`.

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

Branch: refs/heads/TINKERPOP-1602
Commit: 62785dcb686be7d56bf207a0ef4279f912cbe41e
Parents: 67a1092
Author: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Authored: Sat Jan 21 12:29:28 2017 +0100
Committer: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Committed: Sat Jan 21 12:29:28 2017 +0100

----------------------------------------------------------------------
 bin/validate-distribution.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/62785dcb/bin/validate-distribution.sh
----------------------------------------------------------------------
diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh
index 2148610..3c2cc95 100755
--- a/bin/validate-distribution.sh
+++ b/bin/validate-distribution.sh
@@ -169,9 +169,13 @@ echo "OK"
 if [ "${TYPE}" = "CONSOLE" ]; then
   echo -n "* testing script evaluation ... "
   SCRIPT="x = 
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.createModern().traversal().V().count().next();
 println x; x"
-  SCRIPT_FILENAME="${TMP_DIR}/test.groovy"
-  echo ${SCRIPT} > ${SCRIPT_FILENAME}
+  SCRIPT_FILENAME="test.groovy"
+  SCRIPT_PATH="${TMP_DIR}/${SCRIPT_FILENAME}"
+  echo ${SCRIPT} > ${SCRIPT_PATH}
   [[ `bin/gremlin.sh <<< ${SCRIPT} | grep '^==>' | sed -e 's/^==>//'` -eq 6 ]] 
|| { echo "failed to evaluate sample script"; exit 1; }
-  [[ `bin/gremlin.sh -e ${SCRIPT_FILENAME}` -eq 6 ]] || { echo "failed to 
evaluate sample script using -e option"; exit 1; }
+  [[ `bin/gremlin.sh -e ${SCRIPT_PATH}` -eq 6 ]] || { echo "failed to evaluate 
sample script using -e option"; exit 1; }
+  CONSOLE_DIR=`pwd`
+  cd ${TMP_DIR}
+  [[ `${CONSOLE_DIR}/bin/gremlin.sh -e ${SCRIPT_FILENAME}` -eq 6 ]] || { echo 
"failed to evaluate sample script using -e option (using a different working 
directory and a relative script path)"; exit 1; }
   echo "OK"
 fi

Reply via email to