@@ -45,8 +45,6 @@ OPTION:
4545 --skip-list SKIPLIST
4646 --extra-skip-list-suffixes SEMICOLON-SEPARATED LIST OF SUFFIXES
4747 --select-from-file SELECTFILE
48- --test-expr EXPRESSION
49- --debug-fail
5048"
5149
5250err () {
@@ -88,8 +86,6 @@ TRITON_TEST_IGNORE_ERRORS=false
8886SKIP_PIP=false
8987SKIP_PYTORCH=false
9088TEST_UNSKIP=false
91- TEST_FILTER_EXPRESSION=" "
92- TEST_DEBUG_FAIL=false
9389
9490while (( $# != 0 )) ; do
9591 case " $1 " in
@@ -277,14 +273,6 @@ while (( $# != 0 )); do
277273 TRITON_TEST_SELECTFILE=" $( realpath " $2 " ) "
278274 shift 2
279275 ;;
280- --test-expr)
281- TEST_FILTER_EXPRESSION=" $2 "
282- shift 2
283- ;;
284- --debug-fail)
285- TEST_DEBUG_FAIL=true
286- shift
287- ;;
288276 --help)
289277 echo " $HELP "
290278 exit 0
@@ -354,44 +342,12 @@ run_unit_tests() {
354342}
355343
356344run_pytest_command () {
357- local pytest_args=()
358- local pytest_expr=" "
359-
360- # Parse args to separate -k expression
361- local args=(" $@ " )
362- for (( i= 0 ; i< ${# args[@]} ; i++ )) ; do
363- if [[ " ${args[i]} " == " -k" ]]; then
364- pytest_expr=" ${args[i+1]} "
365- i=$(( i + 1 ))
366- continue
367- fi
368- pytest_args+=(" ${args[i]} " )
369- done
370-
371- # Combine with TEST_FILTER_EXPRESSION
372- if [[ -n " $TEST_FILTER_EXPRESSION " ]]; then
373- if [[ -n " $pytest_expr " ]]; then
374- pytest_expr=" ($pytest_expr ) and ($TEST_FILTER_EXPRESSION )"
375- else
376- pytest_expr=" $TEST_FILTER_EXPRESSION "
377- fi
378- fi
379-
380- # Apply -k expression if any
381- if [[ -n " $pytest_expr " ]]; then
382- pytest_args+=(" -k" " $pytest_expr " )
383- fi
384-
385- if [[ " $TEST_DEBUG_FAIL " == true ]]; then
386- pytest_args+=(" --pdb" )
387- fi
388-
389- if [[ -n " $TRITON_TEST_SELECTFILE " ]] || [[ -n " $pytest_expr " ]]; then
390- if pytest " ${pytest_args[@]} " --collect-only > /dev/null 2>&1 ; then
391- pytest " ${pytest_args[@]} "
345+ if [[ -n " $TRITON_TEST_SELECTFILE " ]]; then
346+ if pytest " $@ " --collect-only > /dev/null 2>&1 ; then
347+ pytest " $@ "
392348 fi
393349 else
394- pytest " ${pytest_args[@]} "
350+ pytest " $@ "
395351 fi
396352}
397353
0 commit comments