diff --git a/bin/run_tests b/bin/run_tests index 78c1493fd..ddee02996 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -4,6 +4,29 @@ 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 $* @@ -11,7 +34,7 @@ cd ${bin}/../ # 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