rahil-c commented on code in PR #3641:
URL: https://github.com/apache/polaris/pull/3641#discussion_r2818848808


##########
plugins/spark/v3.5/regtests/run.sh:
##########
@@ -70,6 +70,48 @@ SPARK_VERSION="3.5.6"
 
 SPARK_SHELL_OPTIONS=("PACKAGE" "JAR")
 
+# Auto-discover test suites from the suites/ directory
+# Test files must follow naming convention: <name>_<table_format>.sh
+SUITES_DIR="${SCRIPT_DIR}/suites"
+
+if [[ ! -d "$SUITES_DIR" ]]; then
+  logred "Error: Test suites directory not found: ${SUITES_DIR}"
+  exit 1
+fi
+
+parse_test_suite() {
+  local filename="$1"
+  local base="${filename%.sh}"
+  TABLE_FORMAT="${base##*_}"
+  TEST_SHORTNAME="${base}"
+  TEST_FILE="${SUITES_DIR}/${filename}"
+}
+
+declare -a TEST_SUITES=()
+for test_file in "${SUITES_DIR}"/*.sh; do
+  [[ -f "$test_file" ]] || continue
+  TEST_SUITES+=("$(basename "$test_file")")
+done
+
+if [[ ${#TEST_SUITES[@]} -eq 0 ]]; then
+  logred "Error: No test suites found in ${SUITES_DIR}"
+  exit 1
+fi
+
+# Allow running specific test via environment variable

Review Comment:
   lets do in another pr



##########
plugins/spark/v3.5/regtests/run.sh:
##########
@@ -70,6 +70,48 @@ SPARK_VERSION="3.5.6"
 
 SPARK_SHELL_OPTIONS=("PACKAGE" "JAR")
 
+# Auto-discover test suites from the suites/ directory
+# Test files must follow naming convention: <name>_<table_format>.sh
+SUITES_DIR="${SCRIPT_DIR}/suites"
+
+if [[ ! -d "$SUITES_DIR" ]]; then
+  logred "Error: Test suites directory not found: ${SUITES_DIR}"
+  exit 1
+fi
+
+parse_test_suite() {

Review Comment:
   ack



-- 
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