Skip to content

Commit

Permalink
ts: improve coverage of getModulefileFromLoadingModule proc
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Nov 10, 2024
1 parent b145e02 commit c6f7291
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testsuite/example/siteconfig.tcl-1
Original file line number Diff line number Diff line change
Expand Up @@ -666,5 +666,10 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH)]} {
report [string length [getLoadedPrereqPath foo qux]]
}

# specific tests to improve getModulefileFromLoadingModule coverage
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE)]} {
report [string length [getModulefileFromLoadingModule foo]]
}


}
7 changes: 7 additions & 0 deletions testsuite/modules.00-init/120-siteconfig.exp
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,13 @@ lappend ans $vers_reportre
testouterr_cmd_re sh -V OK [join $ans \n]
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH

setenv_var TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE 1
set ans [list]
lappend ans 0
lappend ans $vers_reportre
testouterr_cmd_re sh -V OK [join $ans \n]
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE


} elseif {$verbose} {
send_user "\tSkip tests relying on an excepted siteconfig file installed\n"
Expand Down

0 comments on commit c6f7291

Please sign in to comment.