[PATCH] scripts/run-test: Keep original prune behaviour

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Oct 25 12:12:12 UTC 2024


Hi George,
On 2024-10-24 at 12:09:59 -0400, george.zhang at amd.com wrote:
> From: George Zhang <george.zhang at amd.com>
> 
> The default prune behaviour of the runner settings was changed.
> This change is to maintain the original behaviour of this script
> while also enabling the prune mode to be overriden.

Thank you for fixing this! I have one nit, see below.

> 
> Fixes: 997bac8 ("runner/settings: set PRUNE_KEEP_ALL as default")
> Cc: Leo Li <sunpeng.li at amd.com>
> Cc: Alex Hung <alex.hung at amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
> Signed-off-by: George Zhang <george.zhang at amd.com>
> Change-Id: I98cafbbaae15788a06eae8b9905615e9231d8e8e
> ---
>  scripts/run-tests.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
> index cd03682b4..f3ae48451 100755
> --- a/scripts/run-tests.sh
> +++ b/scripts/run-tests.sh
> @@ -37,6 +37,7 @@ KERNEL_TREE=
>  USE_PIGLIT=0
>  RUNNER=
>  RESUME=
> +PRUNE_MODE="keep-dynamic"
>  
>  find_file() # basename <possible paths>
>  {
> @@ -154,6 +155,7 @@ print_help() {
>  	echo "                  test run with -R"
>  	echo "                  (only valid for Piglit)"
>  	echo "  -p              use Piglit instead of igt_runner"
> +	echo "  -m              run test runner with prune mode(default: $PRUNE_MODE)"
>  	echo ""
>  	echo "Useful patterns for test filtering are described in the API documentation."
>  }
> @@ -176,6 +178,7 @@ while getopts ":c:dhk:lPr:st:T:vx:Rnpb:" opt; do

imho you should add "m:" after "b:" in while loop

while getopts ":b:c:dhk:lm:npPRr:st:T:vx:" opt; do

Regards,
Kamil

>  		n) NORETRY="--no-retry" ;;
>  		p) USE_PIGLIT=1 ;;
>  		b) FILTER="$FILTER -b $OPTARG" ;;
> +		m) PRUNE_MODE="$OPTARG" ;;
>  		:)
>  			echo "Option -$OPTARG requires an argument."
>  			exit 1
> @@ -253,7 +256,7 @@ if [ "x$RESUME_RUN" != "x" ]; then
>  	execute_runner 1 $RESUME $RESUME_ARGS $COV_ARGS "$RESULTS"
>  else
>  	mkdir -p "$RESULTS"
> -	execute_runner 1 $RUNNER $RUN_ARGS -o -s "$RESULTS" $COV_ARGS $VERBOSE $FILTER
> +	execute_runner 1 $RUNNER $RUN_ARGS -o -s "$RESULTS" $COV_ARGS $VERBOSE $FILTER --prune-mode $PRUNE_MODE
>  fi
>  
>  if [ "$SUMMARY" = "html" ]; then
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list