924060929 commented on code in PR #56799: URL: https://github.com/apache/doris/pull/56799#discussion_r2419833642
########## 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: the suite name maybe not equals to the file name -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org