omkreddy commented on code in PR #16046:
URL: https://github.com/apache/kafka/pull/16046#discussion_r1617138022


##########
tests/docker/run_tests.sh:
##########
@@ -19,20 +19,53 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd 
)"
 KAFKA_NUM_CONTAINERS=${KAFKA_NUM_CONTAINERS:-14}
 TC_PATHS=${TC_PATHS:-./kafkatest/}
 REBUILD=${REBUILD:f}
+TMP_NATIVE_DIR=${SCRIPT_DIR}/native/
+
+get_mode() {
+  if [[ "$_DUCKTAPE_OPTIONS" == *"kafka_mode"* && "$_DUCKTAPE_OPTIONS" == 
*"native"* ]]; then
+    export KAFKA_MODE="native"
+  else
+    export KAFKA_MODE="jvm"
+  fi
+}

Review Comment:
   Can we print the mode here



##########
tests/docker/run_tests.sh:
##########
@@ -19,20 +19,53 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd 
)"
 KAFKA_NUM_CONTAINERS=${KAFKA_NUM_CONTAINERS:-14}
 TC_PATHS=${TC_PATHS:-./kafkatest/}
 REBUILD=${REBUILD:f}
+TMP_NATIVE_DIR=${SCRIPT_DIR}/native/
+
+get_mode() {
+  if [[ "$_DUCKTAPE_OPTIONS" == *"kafka_mode"* && "$_DUCKTAPE_OPTIONS" == 
*"native"* ]]; then
+    export KAFKA_MODE="native"
+  else
+    export KAFKA_MODE="jvm"
+  fi
+}
+
+cleanup() {
+  if [ -d "${TMP_NATIVE_DIR}" ]; then
+    echo "Deleting temporary native dir: ${TMP_NATIVE_DIR}"
+    rm -rf "${TMP_NATIVE_DIR}"
+  fi
+}
 
 die() {
-    echo $@
-    exit 1
+  cleanup
+  echo $@
+  exit 1
 }
 
 if [ "$REBUILD" == "t" ]; then
     ./gradlew clean systemTestLibs
 fi
 
+get_mode
+cleanup && mkdir "${TMP_NATIVE_DIR}"
+if [ "$KAFKA_MODE" == "native" ]; then
+  kafka_tarball_filename=(core/build/distributions/kafka*SNAPSHOT.tgz)

Review Comment:
   Can we print a line stating building for native image



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to