[Patch v3] scripts/run-test: Keep original prune behaviour
george.zhang at amd.com
george.zhang at amd.com
Fri Oct 25 18:29:44 UTC 2024
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.
v2: added m to getopts
v3: fixed bm: -> b:m: in getopts
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>
Cc: Nicholas Choi <nicholas.choi at amd.com>
Signed-off-by: George Zhang <george.zhang at amd.com>
---
scripts/run-tests.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index cd03682b4..082ebaa5a 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,11 +155,12 @@ 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."
}
-while getopts ":c:dhk:lPr:st:T:vx:Rnpb:" opt; do
+while getopts ":c:dhk:lPr:st:T:vx:Rnpb:m:" opt; do
case $opt in
c) COV_ARGS="$COV_ARGS --collect-code-cov --collect-script $OPTARG " ;;
d) download_piglit; exit ;;
@@ -176,6 +178,7 @@ while getopts ":c:dhk:lPr:st:T:vx:Rnpb:" opt; do
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