| 1 |
############################################################################## |
| 2 |
# Modules Revision 3.0 |
| 3 |
# Providing a flexible user environment |
| 4 |
# |
| 5 |
# File: modules.50-cmds/%M% |
| 6 |
# Revision: %I% |
| 7 |
# First Edition: 2021/05/13 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Xavier Delaruelle, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: variant, module-hide, module-forbid, module-tag |
| 14 |
# Modulefiles: variant |
| 15 |
# Sub-Command: avail, list, whatis, paths, is-avail |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Test variant over hide/forbid/tag modules |
| 19 |
# }C% |
| 20 |
# |
| 21 |
############################################################################## |
| 22 |
|
| 23 |
skip_if_quick_mode |
| 24 |
|
| 25 |
set mp $modpath.3 |
| 26 |
set mpre $modpathre.3 |
| 27 |
setenv_path_var MODULEPATH $mp |
| 28 |
|
| 29 |
setenv_var MODULES_ADVANCED_VERSION_SPEC 1 |
| 30 |
|
| 31 |
setenv_var MODULES_TAG_ABBREV {auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS} |
| 32 |
|
| 33 |
|
| 34 |
# |
| 35 |
# module-hide test |
| 36 |
# |
| 37 |
|
| 38 |
setenv_var TESTSUITE_VARIANT_TAG 1 |
| 39 |
set tserr {variant/8.0} |
| 40 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 41 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 42 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 43 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 44 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 45 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 46 |
|
| 47 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 48 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 49 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 50 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 51 |
|
| 52 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 53 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1 |
| 54 |
setenv_var __MODULES_LMTAG variant/8.0&hidden-loaded |
| 55 |
|
| 56 |
set tserr {variant/8.0 <L>} |
| 57 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 58 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 59 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 60 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 61 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 62 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 63 |
|
| 64 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 65 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 66 |
testouterr_cmd_re sh {whatis [email protected] foo=val1} OK $tserr |
| 67 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 68 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 69 |
|
| 70 |
set ans [list [list text $mp/variant/8.0]] |
| 71 |
testouterr_cmd sh {paths [email protected] foo=val1 bar=2} $ans {} |
| 72 |
testouterr_cmd sh {paths [email protected] foo=val1} $ans {} |
| 73 |
testouterr_cmd sh {paths [email protected]} $ans {} |
| 74 |
|
| 75 |
testouterr_cmd sh {is-avail [email protected] foo=val1 bar=2} OK {} |
| 76 |
testouterr_cmd sh {is-avail [email protected] foo=val1} OK {} |
| 77 |
testouterr_cmd sh {is-avail [email protected]} OK {} |
| 78 |
|
| 79 |
testouterr_cmd sh {list -t -o tag} OK {} |
| 80 |
testouterr_cmd sh {list -a -t -o tag} OK {variant/8.0 <H>} |
| 81 |
|
| 82 |
unsetenv_loaded_module |
| 83 |
unsetenv_var __MODULES_LMVARIANT |
| 84 |
unsetenv_var __MODULES_LMTAG |
| 85 |
|
| 86 |
|
| 87 |
# test when module-hide is hard mode and applies to a variant default value specifically |
| 88 |
setenv_var TESTSUITE_VARIANT_TAG 2 |
| 89 |
set tserr {variant/8.0} |
| 90 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 91 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 92 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 93 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 94 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 95 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 96 |
|
| 97 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 98 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 99 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 100 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 101 |
|
| 102 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 103 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1 |
| 104 |
setenv_var __MODULES_LMTAG variant/8.0&hidden-loaded |
| 105 |
|
| 106 |
set tserr {variant/8.0 <L>} |
| 107 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 108 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 109 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 110 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 111 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 112 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 113 |
|
| 114 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 115 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 116 |
testouterr_cmd_re sh {whatis [email protected] foo=val1} OK $tserr |
| 117 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 118 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 119 |
|
| 120 |
set ans [list [list text $mp/variant/8.0]] |
| 121 |
testouterr_cmd sh {paths [email protected] foo=val1 bar=2} $ans {} |
| 122 |
testouterr_cmd sh {paths [email protected] foo=val1} $ans {} |
| 123 |
testouterr_cmd sh {paths [email protected]} $ans {} |
| 124 |
|
| 125 |
testouterr_cmd sh {is-avail [email protected] foo=val1 bar=2} OK {} |
| 126 |
testouterr_cmd sh {is-avail [email protected] foo=val1} OK {} |
| 127 |
testouterr_cmd sh {is-avail [email protected]} OK {} |
| 128 |
|
| 129 |
testouterr_cmd sh {list -t -o tag} OK {} |
| 130 |
testouterr_cmd sh {list -a -t -o tag} OK {variant/8.0 <H>} |
| 131 |
|
| 132 |
unsetenv_loaded_module |
| 133 |
unsetenv_var __MODULES_LMVARIANT |
| 134 |
unsetenv_var __MODULES_LMTAG |
| 135 |
|
| 136 |
|
| 137 |
# test when module-hide applies to generic module name |
| 138 |
setenv_var TESTSUITE_VARIANT_TAG 5 |
| 139 |
set tserr {variant/8.0} |
| 140 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 141 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 142 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 143 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 144 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 145 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 146 |
|
| 147 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 148 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 149 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 150 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 151 |
|
| 152 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 153 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 |
| 154 |
setenv_var __MODULES_LMTAG variant/8.0&hidden-loaded |
| 155 |
|
| 156 |
set tserr {variant/8.0 <L>} |
| 157 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 158 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 159 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 160 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 161 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 162 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 163 |
|
| 164 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 165 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 166 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 167 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 168 |
|
| 169 |
testouterr_cmd sh {list -t -o tag} OK {} |
| 170 |
testouterr_cmd sh {list -a -t -o tag} OK {variant/8.0 <H>} |
| 171 |
|
| 172 |
unsetenv_loaded_module |
| 173 |
unsetenv_var __MODULES_LMVARIANT |
| 174 |
unsetenv_var __MODULES_LMTAG |
| 175 |
|
| 176 |
|
| 177 |
# dot hidden file |
| 178 |
setenv_var TESTSUITE_VARIANT_TAG 7 |
| 179 |
set tserr {'variant/.w s' <H>} |
| 180 |
testouterr_cmd sh {avail -t -o tag variant/.w\ s} OK $tserr |
| 181 |
testouterr_cmd sh {avail -t -o tag variant/.w\ s foo=val1} OK $tserr |
| 182 |
testouterr_cmd sh {avail -t -o tag variant/.w\ s foo=val1 bar=1} OK $tserr |
| 183 |
testouterr_cmd sh {avail -t -o tag variant/.w\ s foo=val1 bar=2} OK $tserr |
| 184 |
|
| 185 |
|
| 186 |
# |
| 187 |
# module-forbid test |
| 188 |
# |
| 189 |
|
| 190 |
setenv_var TESTSUITE_VARIANT_TAG 11 |
| 191 |
set tserr {variant/8.0} |
| 192 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 193 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 194 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 195 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 196 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 197 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 198 |
|
| 199 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 200 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 201 |
testouterr_cmd_re sh {whatis [email protected] foo=val1} OK $tserr |
| 202 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 203 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 204 |
|
| 205 |
set ans [list [list text $mp/variant/8.0]] |
| 206 |
testouterr_cmd sh {paths [email protected] foo=val1 bar=2} $ans {} |
| 207 |
testouterr_cmd sh {paths [email protected] foo=val1} $ans {} |
| 208 |
testouterr_cmd sh {paths [email protected]} $ans {} |
| 209 |
|
| 210 |
# access denied error obtained on is-avail as a module selection is made |
| 211 |
testouterr_cmd sh {is-avail [email protected] foo=val1 bar=2} ERR {} |
| 212 |
testouterr_cmd sh {is-avail [email protected] foo=val1} ERR {} |
| 213 |
testouterr_cmd sh {is-avail [email protected]} OK {} |
| 214 |
|
| 215 |
|
| 216 |
setenv_var TESTSUITE_VARIANT_TAG 14 |
| 217 |
set tserr {variant/8.0} |
| 218 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 219 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 220 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 221 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 222 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 223 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 224 |
|
| 225 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 226 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 227 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 228 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 229 |
|
| 230 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 231 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1 |
| 232 |
setenv_var __MODULES_LMTAG variant/8.0&nearly-forbidden |
| 233 |
|
| 234 |
set tserr {variant/8.0 <L:nF>} |
| 235 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 236 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 237 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 238 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 239 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 240 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 241 |
|
| 242 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 243 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 244 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 245 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 246 |
|
| 247 |
testouterr_cmd sh {list -t -o tag} OK {variant/8.0 <nF>} |
| 248 |
|
| 249 |
unsetenv_loaded_module |
| 250 |
unsetenv_var __MODULES_LMVARIANT |
| 251 |
unsetenv_var __MODULES_LMTAG |
| 252 |
|
| 253 |
|
| 254 |
setenv_var TESTSUITE_VARIANT_TAG 15 |
| 255 |
set tserr {variant/8.0} |
| 256 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 257 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 258 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 259 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 260 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 261 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 262 |
|
| 263 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 264 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 265 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 266 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 267 |
|
| 268 |
|
| 269 |
setenv_var TESTSUITE_VARIANT_TAG 16 |
| 270 |
set tserr {variant/8.0 <F>} |
| 271 |
# module not found when variant is specified as module cannot be evaluated |
| 272 |
# to find if it defines variant, as it is tagged forbidden |
| 273 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 274 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK {} |
| 275 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 276 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK {} |
| 277 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK {} |
| 278 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK {} |
| 279 |
|
| 280 |
set tserr [err_accessdenied variant/8.0] |
| 281 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} ERR "$err_path'[email protected] foo=val1 bar=2'" |
| 282 |
testouterr_cmd_re sh {whatis [email protected]} ERR $tserr |
| 283 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} ERR "$err_path'[email protected]:8.5 foo=val1'" |
| 284 |
|
| 285 |
set ans [list [list text $mp/variant/8.0]] |
| 286 |
testouterr_cmd sh {paths [email protected]:8.5} $ans {} |
| 287 |
testouterr_cmd sh {paths [email protected]:8.5 foo=val1} OK {} |
| 288 |
|
| 289 |
|
| 290 |
# |
| 291 |
# module-tag test (sticky/super-sticky) |
| 292 |
# |
| 293 |
|
| 294 |
setenv_var TESTSUITE_VARIANT_TAG 21 |
| 295 |
set tserr {variant/8.0} |
| 296 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 297 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 298 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 299 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 300 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 301 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 302 |
|
| 303 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 304 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 305 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 306 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 307 |
|
| 308 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 309 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1 |
| 310 |
setenv_var __MODULES_LMTAG variant/8.0&sticky |
| 311 |
|
| 312 |
set tserr {variant/8.0 <L:S>} |
| 313 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 314 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 315 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 316 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 317 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 318 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 319 |
|
| 320 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 321 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 322 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 323 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 324 |
|
| 325 |
testouterr_cmd sh {list -t -o tag} OK {variant/8.0 <S>} |
| 326 |
|
| 327 |
unsetenv_loaded_module |
| 328 |
unsetenv_var __MODULES_LMVARIANT |
| 329 |
unsetenv_var __MODULES_LMTAG |
| 330 |
|
| 331 |
|
| 332 |
setenv_var TESTSUITE_VARIANT_TAG 24 |
| 333 |
set tserr {variant/8.0} |
| 334 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 335 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 336 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 337 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 338 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 339 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 340 |
|
| 341 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 342 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 343 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 344 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 345 |
|
| 346 |
setenv_loaded_module [list variant/8.0] [list $mp/variant/8.0] |
| 347 |
setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1 |
| 348 |
setenv_var __MODULES_LMTAG variant/8.0&super-sticky |
| 349 |
|
| 350 |
set tserr {variant/8.0 <L:sS>} |
| 351 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 352 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 353 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 354 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 355 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 356 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 357 |
|
| 358 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 359 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 360 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 361 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 362 |
|
| 363 |
testouterr_cmd sh {list -t -o tag} OK {variant/8.0 <sS>} |
| 364 |
|
| 365 |
unsetenv_loaded_module |
| 366 |
unsetenv_var __MODULES_LMVARIANT |
| 367 |
unsetenv_var __MODULES_LMTAG |
| 368 |
|
| 369 |
|
| 370 |
setenv_var TESTSUITE_VARIANT_TAG 25 |
| 371 |
set tserr {variant/8.0} |
| 372 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 373 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 374 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 375 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 376 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 377 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 378 |
|
| 379 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 380 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 381 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 382 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 383 |
|
| 384 |
|
| 385 |
setenv_var TESTSUITE_VARIANT_TAG 26 |
| 386 |
set tserr {variant/8.0 <S>} |
| 387 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5} OK $tserr |
| 388 |
testouterr_cmd sh {avail -t -o tag [email protected]:8.5 foo=val1} OK $tserr |
| 389 |
testouterr_cmd sh {avail -t -o tag [email protected]} OK $tserr |
| 390 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1} OK $tserr |
| 391 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=1} OK $tserr |
| 392 |
testouterr_cmd sh {avail -t -o tag [email protected] foo=val1 bar=2} OK $tserr |
| 393 |
|
| 394 |
set tserr "$modlin $mpre $modlin\n\\s+variant/8.0: variant/8.0" |
| 395 |
testouterr_cmd_re sh {whatis [email protected] foo=val1 bar=2} OK $tserr |
| 396 |
testouterr_cmd_re sh {whatis [email protected]} OK $tserr |
| 397 |
testouterr_cmd_re sh {whatis [email protected]:8.5 foo=val1} OK $tserr |
| 398 |
|
| 399 |
|
| 400 |
# |
| 401 |
# Cleanup |
| 402 |
# |
| 403 |
|
| 404 |
reset_test_env |