Xavier Delaruelle
acfb4f24c5
ts: add test to improve getInterpVar proc coverage
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
69f1f15c99
ts: move conflict error mngt inside execute-modulefile
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
ab007520e1
Move conflict error mngt inside execute-modulefile
...
Move conflict error management after load evaluation directly within
modulefile execution process. Conflict error management was previously
located after execute-modulefile.
Skips conflict error management when evaluating global rc files.
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
8b3d1e0e3a
Rationalize conflict msg generation code
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
295783ec68
ts: report all conflicting loaded module
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
90ac8a2150
Report all conflicting loaded module
...
When reporting a conflict, report all conflicting loaded or loading
modules.
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
1d889728ec
Fix is-loading argument passing
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
c00d764b3e
No return of conflict spec from doesModuleConflict proc
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
1699ee1223
Simplify conflict msg check now actual module is recorded
...
Conflicting loaded module is now reported in error message and recorded
rather conflict spec. It is thus easier to determine if this conflict
has already been reported when checking after load evaluation.
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
c42f3aa155
Fix inconsistent modulefile state stack
...
Fix wrong modulefile state initialization introduced by 261970ce .
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
7349fdd9b2
ts: report conflicting module rather conflict spec
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
4f6e0bf14a
Report conflicting module rather conflict spec
...
Update conflict message to report loaded module name that conflicts
rather conflict module specification.
2024-01-19 06:54:21 +01:00
Xavier Delaruelle
e222eae2e4
ts: no increase of error count when urequn fails
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
3fb9b898ce
No increase of error count when urequn fails
...
As *useless requirement unload* error is reported as a warning (as it
does not impact main unload process), do not increase error count on
such error.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
e63bf96be5
Provide way to decrease error count
...
Add decrErrorCount helper procedure to decrease current error counter
state. Update name of raiseErrorCount procedure into incrErrorCount to
improve readability.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
3055adf0da
doc: fix typo in hide-or-forbid design doc
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
68fefd99f1
Remove report on top level block capability
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
5595bbfc5c
Report unload depun warning locally
...
Dependent unload mechanism is only triggered from top level evaluation.
So dependent unload warnings were already only emitted to the top level
message block.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
75ffc8572e
ts: unload urequn warning is reported locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
f00eb279df
Report unload urequn warning locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
54025a7d86
ts: switch urequn --no-auto warning is reported locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
27dc680b1f
Report switch urequn warning in --no-auto mode locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
f705854c86
ts: load urequn --no-auto warning is reported locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
b5bc1b11fa
Report load urequn warning in --no-auto mode locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
a6e2f5a47d
ts: depre warning is reported locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
05293f0193
Report depre warning locally
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
350fae8f4c
ts: add sub modfile module load tests in 50/590
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
7d846c5336
ts: add module load in modulefile conflict tests in 50/590
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
93d58d880b
ts: add sub modfile module unload tests in 50/610
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
1e9eab7cb7
ts: add sub modfile module switch tests in 50/616
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
18754e8435
ts: adapt tests using err/1.0 as error msg changed
...
Due to the use of line continuation backslash in switch command block,
error message raising from err/1.0 test modulefile are changed on Tcl
8.6+. Error messages are now the same than on Tcl 8.5.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
654b7319e0
ts: add prereq/module load urequn sticky tests in 50/616
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
02ff44215c
ts: add prereq/module load depun sticky tests in 50/616
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
18830f1b5a
ts: add prereq/module load urequn sticky tests in 50/610
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
474bd7e431
ts: add prereq/module load depun sticky tests in 50/610
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
aafe8b4d38
ts: add depre module unload in modulefile tests in 50/610
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
90dc789c25
ts: add depre module load in modulefile tests in 50/590
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
0640831bfb
ts: add depre load error in modfile tests in 50/616
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
67448e5ff8
Inhibit error/warning report if msg is empty
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
a66db1aa45
Clarify cmdModuleLoad local var to known if one is loaded
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
046c127e2e
Report switched-on load issue to the above msg block
...
Move issue report outside of load action block to send message on local
context (switch message block) rather top context.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
7a165670d9
ts: adapt tests now failed module switch raises error
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
9918272d01
Raise error when module switch in modulefile fails
...
Like for "module unload" and "module load", raise an error when "module
switch" command in modulefile fails to either its unload or load phase.
Error is not raised when --force option is set.
"module switch" in modulefile was previously raising error either:
* at the end of whole modulefile evaluation when conflict exists
* right at the end of the "module switch" command if switched-on module
requirement was not satisfied.
Thus in some cases, errors during "module switch" did not lead to an
error raise and a modulefile evaluation stop. Especially when switch
unload phase fails but without registering a conflict.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
a703402d0d
Fix *module not loaded* unload msg block
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
9282ca3d5f
ts: adapt tests now eval continues when switched-off fails
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
49bfd964e0
Continue even if unload/switch-off fails when forced
...
When modulefile command "module unload" and unload phase of "module
switch" modulefile command raise an error, continue evaluation if
--force option is set.
This change only has an effect if error comes from a *super-sticky
unload* attempt. Other errors do not raise an error already with --force
option set.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
1a52ab1be7
ts: adapt tests now conflict msgs are not duplicated
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
d6c396c399
Fix duplicate conflict error message when loading
...
Rework conflict check after module evaluation to avoid reporting both
*unloading conflict failed* and *conflict is loading* messages.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
cab689eac8
Add isConflictErrorAlreadyReported helper procedure
...
Check in a dedicated procedure if conflict error has already been
reported.
2024-01-19 06:54:20 +01:00
Xavier Delaruelle
844dd4e0d0
Add knerrorOrWarningIfForced helper procedure
2024-01-19 06:54:20 +01:00