Skip to content

Commit cde1096

Browse files
committed
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 <xavier.delaruelle@cea.fr>
1 parent 31741fc commit cde1096

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎testsuite/config/base-config.exp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,10 +1390,12 @@ proc is_quick_mode {} {
13901390
$::env(QUICKTEST)]}]
13911391
}
13921392

1393-
# if quick test mode is running stop processing of current test file
1394-
proc skip_if_quick_mode {} {
1393+
# if quick test mode is running stop processing of current test file after
1394+
# removing given fixture paths
1395+
proc skip_if_quick_mode {args} {
13951396
if {[is_quick_mode]} {
13961397
send_user "\tSkipping tests as quick test mode is enabled\n"
1398+
file delete -force {*}$args
13971399
reset_test_env
13981400
return -code 0 -level 2 0
13991401
}

‎testsuite/modules.20-locate/180-modulepath-ignore.exp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ unsetenv_var MODULES_MODULEPATH_IGNORE
9393
# execution
9494
testouterr_cmd sh {--no-modulepath-ignore avail -a -t -o } OK $tserr
9595

96-
skip_if_quick_mode
96+
skip_if_quick_mode $mp1
9797

9898
# ignore all accept some idiom with negated patterns
9999
file mkdir $mp2/app

‎testsuite/modules.30-cache/060-cachebuild-ignore.exp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ testouterr_cmd sh {--no-modulepath-ignore --ignore-cache is-avail bar/2.0}\
105105

106106
file delete $mp1cache
107107

108-
skip_if_quick_mode
108+
skip_if_quick_mode $mp1
109109

110110
# every element is recorded in cache when modulepath_ignore is disabled
111111
setenv_var MODULES_MODULEPATH_IGNORE 0

0 commit comments

Comments
 (0)