englefly commented on code in PR #56799:
URL: https://github.com/apache/doris/pull/56799#discussion_r2422325565


##########
run-regression-test.sh:
##########
@@ -206,6 +209,49 @@ export JAVA="${JAVA_HOME}/bin/java"
 
 REGRESSION_OPTIONS_PREFIX=''
 
+# Parse -f/--file option and convert to -d and -s
+FILE_PATH=""
+NEW_ARGS=()
+SKIP_NEXT=0
+
+for arg in "$@"; do
+    if [[ ${SKIP_NEXT} -eq 1 ]]; then
+        FILE_PATH="${arg}"
+        SKIP_NEXT=0
+        continue
+    fi
+    
+    if [[ "${arg}" == "-f" ]] || [[ "${arg}" == "--file" ]]; then
+        SKIP_NEXT=1
+        continue
+    fi
+    
+    NEW_ARGS+=("${arg}")
+done
+
+# If -f option is provided, extract directory and suite name
+if [[ -n "${FILE_PATH}" ]]; then
+    # Extract directory (parent path)
+    # e.g., "regression-test/suites/shape_check/tpch_sf1000/shape/q1.groovy" 
-> "regression-test/suites/shape_check/tpch_sf1000/shape"
+    FILE_DIR=$(dirname "${FILE_PATH}")
+    
+    # Extract suite name (filename without .groovy or .sql extension)
+    # e.g., "q1.groovy" -> "q1" or "q01.sql" -> "q01"
+    FILE_NAME=$(basename "${FILE_PATH}")
+    # Remove .groovy extension if exists
+    SUITE_NAME="${FILE_NAME%.groovy}"

Review Comment:
   in most of cases, case name is the same as file name.
   maybe we need an item in "best practice" that case name should be the same 
as file name :)
   
   this pr is mainly use by developers



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to