Skip to content
Permalink
Browse files
Added a general command line parameter "--jvm" to pass Java options t…
…o the test runs and --debug to enable remote debug with default options (#573)

The following examples both enable remote debug during the test run:

./bin/run_tests -s Functional -g functional -d --jvm "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=50000,server=y,suspend=y"

./bin/run_tests -s Functional -g functional -d --debug
  • Loading branch information
agozhiy authored and Agirish committed Apr 12, 2019
1 parent 1820a38 commit 457c4be65dd611b99954b7e82d25bd0c30553e36
Showing 1 changed file with 25 additions and 2 deletions.
@@ -4,14 +4,37 @@ bin=`cd "$bin">/dev/null; pwd`
source conf/drillTestConfig.properties
cd ${bin}/../

default_debug_string="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=50000,server=y,suspend=y"

ARGS=()
while [[ $# > 0 ]]
do
arg="$1"
case "$arg" in
--jvm)
shift
DRILL_TEST_FRAMEWORK_JAVA_OPTS="$DRILL_TEST_FRAMEWORK_JAVA_OPTS $1"
shift
;;
--debug)
DRILL_TEST_FRAMEWORK_JAVA_OPTS="$DRILL_TEST_FRAMEWORK_JAVA_OPTS $default_debug_string"
shift
;;
*)
ARGS+=("$1")
shift
;;
esac
done

# when testing a JDBC driver other than the default apache JDBC driver, uncomment the following
# and set ${JDBC_DRIVER_CP} inside conf/drillTestConfig.properties
# java -cp conf/:${JDBC_DRIVER_CP}:framework/target/framework-1.0.0-SNAPSHOT-shaded.jar:${HADOOP_INSTALL_LOC}/lib/* org.apache.drill.test.framework.TestDriver $*

# use the following line when testing apache drill JDBC driver
if [[ $HADOOP_VERSION == *"mapr"* ]]
then
java -Xss40m -cp conf/:${DRILL_HOME}/jars/jdbc-driver/drill-jdbc-all-${DRILL_VERSION}.jar:framework/target/framework-1.0.0-SNAPSHOT-shaded.jar -Dfs.mapr.bailout.on.library.mismatch=false -Djava.io.tmpdir=/tmp/drill/tests -Djava.security.auth.login.config=/opt/mapr/conf/mapr.login.conf -Dzookeeper.sasl.client=false org.apache.drill.test.framework.TestDriver $*
java $DRILL_TEST_FRAMEWORK_JAVA_OPTS -Xss40m -cp conf/:${DRILL_HOME}/jars/jdbc-driver/drill-jdbc-all-${DRILL_VERSION}.jar:framework/target/framework-1.0.0-SNAPSHOT-shaded.jar -Dfs.mapr.bailout.on.library.mismatch=false -Djava.io.tmpdir=/tmp/drill/tests -Djava.security.auth.login.config=/opt/mapr/conf/mapr.login.conf -Dzookeeper.sasl.client=false org.apache.drill.test.framework.TestDriver "${ARGS[@]}"
else
java -Xss40m -cp conf/:${DRILL_HOME}/jars/jdbc-driver/drill-jdbc-all-${DRILL_VERSION}.jar:framework/target/framework-1.0.0-SNAPSHOT-shaded.jar org.apache.drill.test.framework.TestDriver $*
java $DRILL_TEST_FRAMEWORK_JAVA_OPTS -Xss40m -cp conf/:${DRILL_HOME}/jars/jdbc-driver/drill-jdbc-all-${DRILL_VERSION}.jar:framework/target/framework-1.0.0-SNAPSHOT-shaded.jar org.apache.drill.test.framework.TestDriver "${ARGS[@]}"
fi

0 comments on commit 457c4be

Please sign in to comment.