From cde1096ec3de58faecf5896232022a5f83cd79ef Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Thu, 17 Sep 2026 07:47:20 +0200 Subject: [PATCH] ts: remove fixtures left behind when quick mode skips a testfile The skip_if_quick_mode procedure returns out of the current testfile, so the cleanup block at its end is not reached. Testfiles creating a fixture directory before this skip point and removing it in this block leave it behind under the testsuite directory after a quick mode run. This is the case of 180-modulepath-ignore.exp and 060-cachebuild-ignore.exp. Accept fixture paths as arguments of skip_if_quick_mode to remove them when tests are skipped, and pass the directory both testfiles need after the skip point. This avoids duplicating their fixture creation block around the skip. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle --- testsuite/config/base-config.exp | 6 ++++-- testsuite/modules.20-locate/180-modulepath-ignore.exp | 2 +- testsuite/modules.30-cache/060-cachebuild-ignore.exp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/testsuite/config/base-config.exp b/testsuite/config/base-config.exp index 6f2206ac5..7ccc204e0 100644 --- a/testsuite/config/base-config.exp +++ b/testsuite/config/base-config.exp @@ -1390,10 +1390,12 @@ proc is_quick_mode {} { $::env(QUICKTEST)]}] } -# if quick test mode is running stop processing of current test file -proc skip_if_quick_mode {} { +# if quick test mode is running stop processing of current test file after +# removing given fixture paths +proc skip_if_quick_mode {args} { if {[is_quick_mode]} { send_user "\tSkipping tests as quick test mode is enabled\n" + file delete -force {*}$args reset_test_env return -code 0 -level 2 0 } diff --git a/testsuite/modules.20-locate/180-modulepath-ignore.exp b/testsuite/modules.20-locate/180-modulepath-ignore.exp index 64f940535..aacf3eecb 100644 --- a/testsuite/modules.20-locate/180-modulepath-ignore.exp +++ b/testsuite/modules.20-locate/180-modulepath-ignore.exp @@ -93,7 +93,7 @@ unsetenv_var MODULES_MODULEPATH_IGNORE # execution testouterr_cmd sh {--no-modulepath-ignore avail -a -t -o } OK $tserr -skip_if_quick_mode +skip_if_quick_mode $mp1 # ignore all accept some idiom with negated patterns file mkdir $mp2/app diff --git a/testsuite/modules.30-cache/060-cachebuild-ignore.exp b/testsuite/modules.30-cache/060-cachebuild-ignore.exp index 440e7b71b..e1eed0abc 100644 --- a/testsuite/modules.30-cache/060-cachebuild-ignore.exp +++ b/testsuite/modules.30-cache/060-cachebuild-ignore.exp @@ -105,7 +105,7 @@ testouterr_cmd sh {--no-modulepath-ignore --ignore-cache is-avail bar/2.0}\ file delete $mp1cache -skip_if_quick_mode +skip_if_quick_mode $mp1 # every element is recorded in cache when modulepath_ignore is disabled setenv_var MODULES_MODULEPATH_IGNORE 0