Commit Graph

4768 Commits

Author SHA1 Message Date
Xavier Delaruelle
030bc75976 doc: desc. quick testsuite mode in CONTRIBUTING 2022-09-03 16:00:54 +02:00
Xavier Delaruelle
4bc4b365ef Update autoinit sh code to fix SC2166/SC2086
Apply on auto-generated autoinit code for sh-kind shells the same
changes than initialization scripts to fix the SC2166 and SC2086 issues
reported by ShellCheck linter.

Autoinit generated code is thus kept in line with initialization script
code.
2022-09-03 16:00:54 +02:00
Lukáš Zaoral
0d6bc10c70 lint(ShellCheck): fix SC2163 warning
According to ShellCheck's documentation:

export takes a variable name, but ShellCheck has noticed that you give it
an expanded variable instead.  Remove $/${} for that, or use ${var?} to quiet.

Related: https://www.shellcheck.net/wiki/SC2163
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
0877b01865 lint(ShellCheck): fix SC2046 warning
According to ShellCheck's documentation:

When command expansions are unquoted, word splitting and globbing will occur.
This often manifests itself by breaking when filenames contain spaces.

Related: https://www.shellcheck.net/wiki/SC2046
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
d018f7a9e6 lint(ShellCheck): fix SC2086 info diagnostic
Some variables, that were unquoted intentionally were converted to arrays.

According to ShellCheck's documentation:

Quoting variables prevents word splitting and glob expansion, and prevents
the script from breaking when input contains spaces, line feeds, glob
characters and such.

Related: https://www.shellcheck.net/wiki/SC2086
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
5939a00154 lint(ShellCheck): fix SC2155 warning
According to ShellCheck's documentation:

In the original code, the return value of mycmd in $(mycmd) is ignored,
and export will instead always return true.  This may prevent conditionals,
set -e and traps from working correctly.

Related: https://www.shellcheck.net/wiki/SC2155
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
7418b3fce0 lint(ShellCheck): fix SC2128 warning
These occurrences do not cause any problems described below but it's better
to be verbose that we indeed want to access the first array element.

According to ShellCheck's documentation:

When referencing arrays, $myarray is equivalent to ${myarray[0]} --
it results in only the first of multiple elements.

Related: https://www.shellcheck.net/wiki/SC2128
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
06b0a89655 lint(ShellCheck): fix SC2048 warning
According to ShellCheck's documentation:

Use "$@" (with quotes) to prevent whitespace problems.  $* and ${array[*]},
unquoted, is subject to word splitting and globbing.

Related: https://www.shellcheck.net/wiki/SC2048
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
169c534a92 lint(ShellCheck): fix SC2178 warning
These occurrences do not seem to cause any problems described below but
let's still fix it for the sake of consistency within this script.

According to ShellCheck's documentation:

ShellCheck noticed that you have used a variable as an array, but then assign
it a string.  array=foo is equivalent to array[0]=foo, and leaves the rest
of the elements unaffected.

Related: https://www.shellcheck.net/wiki/SC2178
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
65309830cb lint(ShellCheck): fix SC2166 warning
According to ShellCheck's documentation:

-a and -o  in [ .. ] test expressions are not well defined, and can cause
incorrect results when arguments start with dashes or contain !.

Related: https://www.shellcheck.net/wiki/SC2166
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
e388118bdc lint(ShellCheck): fix SC1035 error
According to ShellCheck's documentation:

Bourne shells are very whitespace sensitive.  Adding or removing spaces can
drastically alter the meaning of a script.

Related: https://www.shellcheck.net/wiki/SC1035
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
0ecc9fa480 lint(ShellCheck): fix SC2068 error
According to ShellCheck's documentation:

Double quotes around $@ and ${array[@]}) prevent globbing and word splitting
of individual elements, while still expanding to multiple separate arguments.

Related: https://www.shellcheck.net/wiki/SC2068
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
a45f186200 lint(ShellCheck): fix SC2148 error
According to ShellCheck's documentation:

Different shells support different features.  To give effective advice,
ShellCheck needs to know which shell your script is going to run on.

Related: https://www.shellcheck.net/wiki/SC2148
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
d688b538f3 init: add vim modeline to {,b,k}sh scripts
... to enable correct syntax highlighting.
2022-09-02 09:52:05 +02:00
Xavier Delaruelle
6965ba3f40 doc: desc. usage and --help work for scripts in NEWS 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
4dbb6edec4 script: add usage msg and --help option on mtreview 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
3e6b3b9b88 script: add usage msg and --help option on mlprof 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
fbf9f657cf script: add usage msg and --help option on mt 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
41c45a4bc5 ts: accept version name with '_' char 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
e7b1985dde script: keep old releases among benched versions in mb
Update mb script to skip several releases and be able to run bench or
profiling on old and recent releases. Versions 4.1, 4.3, 4.5, 4.7 and
5.1 are retained for bench mode. 4.5, 4.7 and 5.1 are retained for
profile mode.
2022-09-01 06:43:38 +02:00
Xavier Delaruelle
3e31e18cfc script: add usage msg and --help option on mb 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
2105897e95 script: add usage msg and --help option on mrel 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
dc41667c97 script: add usage msg and --help option on mpub 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
dcaca9aa2e Fix notices reported by linter on tcl source files
All linter reports are now fixed. Remove specific linter rule for
modulecmd.tcl in lint testsuite.
2022-09-01 06:43:38 +02:00
Xavier Delaruelle
6939ff9d6f gh: migrate linux tests to ubuntu-20.04
ubuntu-18.04 is being deprecated and will be removed in a few weeks. For
Tcl 8.5 jobs, the Tcl version has to be deployed manually.
2022-09-01 06:43:38 +02:00
Xavier Delaruelle
d9f7bb0e08 Fix too long line issues on Tcl source files 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
783c3d3d97 gh: add lint-tests workflow 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
4d13524407 Fix warnings reported by linter on tcl source files 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
d7c025ea40 Fix errors reported by linter on tcl source files
Use Nagelfar comments to help linter to correctly understand dynamic
aspects of the code.
2022-09-01 06:43:38 +02:00
Xavier Delaruelle
e08b0746c6 init: fix too long line issues in tcl 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
6dc8e629da script: fix too long line issues in mb/mrel/nglfar2ccov 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
f5b8e2e08b script: fix lint issues on mrel/mlprof/mtreview 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
d589b371cb ts: add tcl script lint tests 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
f88ba27be0 Remove testsyntax Makefile target
testsyntax Makefile target is removed. testlint testsuite has to be used
instead.
2022-09-01 06:43:38 +02:00
Xavier Delaruelle
13d99162c8 ts: add ksh script lint tests 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
ffc43e6fc4 ts: add bash script lint tests 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
a05b68d4d3 ts: add sh script lint tests 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
7a41543601 ts: add lint testsuite 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
3a1531bec8 contrib: remove unmaintained template/script content
Remove the contrib template and scripts files as they are not maintained
since a long time in this repository and seem to be deprecated.
2022-08-26 20:47:59 +02:00
Xavier Delaruelle
8f5f423958 doc: desc initial environment in MIGRATING 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
181130d1d6 doc: fix changed/new features dispatch in changes doc 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
59d66a5b7b doc: desc. sticky unload on restore in design notes 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
4badc28143 doc: use bullet list for concise desc. in change doc 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
4541ba1479 doc: desc. sticky unload on restore in NEWS/man/changes 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
49745accd1 ts: adapt existing tests for sticky unload on restore 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
95a64f0eda Allow unload of sticky modules on restore sub-cmd
Allow the unload of sticky modules when restoring collection. Goal is to
be able to restore designated collection as it was saved, thus without
the loaded sticky modules. If such collections were saved without the
sticky modules in it, it means that these sticky modules can safely be
unloaded when moving to the collection state.

As a result, using the --force option is of no use for restore
sub-command.

This change does not impact super-sticky modules. Such modules cannot be
unloaded during a restore, even if forced.

With this change, behavior of restore sub-command with sticky modules is
aligned with Lmod.
2022-08-25 08:10:01 +02:00
Xavier Delaruelle
b962935a10 doc: add initial-environment design notes 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
f0cc54f449 ts: add reset_target_state tests in 70/440 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
f5b5d2435e doc: desc. reset_target_state in NEWS/man/changes 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
a8b6bd2c9e ts: test reset_target_state config option 2022-08-25 08:10:01 +02:00