Commit Graph

78 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
7a41543601 ts: add lint testsuite 2022-09-01 06:43:38 +02:00
Xavier Delaruelle
9a119ec5e2 contrib,script: enclose installation path references
Update add.modules script and example modulefiles to enclose all
references to the installation paths.
2022-06-16 18:57:30 +02:00
Xavier Delaruelle
eb8708e470 install: locate rpmlint rc file with -r in mrel
Update mrel script to locate rpmlint rc file with the -r command-line
switch as -f is not recognized anymore on rpmlint v2.
2022-05-31 07:00:20 +02:00
Xavier Delaruelle
60c3a3311b install: add rpmlint rc config file
Add rpmlint rc configuration file to filter false positive warning
messages when checking RPM spec file and built packages.

Update 'mrel' script to use this rc configuration file when linting RPM
spec file.
2022-05-03 14:12:20 +02:00
Xavier Delaruelle
2bb8365cb2 script: no line number dependency for expected errors
Update mpub and mrel scripts not to depend on the line number expressed
in error message when comparing them to expected error message.
2022-05-01 07:38:31 +02:00
Xavier Delaruelle
024fc61bfa script: add commit-msg hook script to check commit msg 2022-03-05 10:54:49 +01:00
Xavier Delaruelle
db43f9815b script: update pre-commit to spell check docs with Aspell 2022-03-05 09:37:41 +01:00
Xavier Delaruelle
f45d8b6375 script: pre-commit warn if codespell not installed 2022-03-05 09:37:41 +01:00
Xavier Delaruelle
ff6a1362b7 script: add pre-commit script to verify commits 2022-03-02 07:31:30 +01:00
Dimitri Papadopoulos
e9a6678eec Fix typos found by codespell 2022-02-15 05:54:03 +01:00
Xavier Delaruelle
cff324bbf0 script: update modshare var name in mb 2021-08-08 13:27:53 +02:00
Xavier Delaruelle
e0e3b6d3b3 script: exclude alpha/beta and old releases in mb
Exclude from bench or profiling tests releases older than 4.3 (or 4.6 in
profiling mode). Also exclude from these tests the alpha and beta
releases.
2021-08-01 09:30:16 +02:00
Xavier Delaruelle
82eda166be script: call nglfar2ccov over each tcl split scripts 2021-08-01 09:30:16 +02:00
Xavier Delaruelle
2d56b7f41e Split main procs and code in dedicated file 2021-07-30 10:11:54 +02:00
Xavier Delaruelle
c77ef6673d script: limit output header length in mb 2021-07-29 17:33:19 +02:00
Xavier Delaruelle
d4da878338 script: consider alpha/beta valid release name in mrel/mpub 2021-07-25 21:36:37 +02:00
Xavier Delaruelle
4dfb4fe6e9 Add '__' prefix to name of loaded env tracking env variable
Rename the environment variables that are used by Modules to track
loaded environment state (variables whose name starts with `MODULES_LM`).
A `__` prefix is added to the name of these variables to indicate that
they are intended for internal use only.
2021-07-24 14:06:09 +02:00
Xavier Delaruelle
3f801de0a7 ts: introduce quick test mode
Introduce the non-regression quick test mode. When the `QUICKTEST`
environment variable is set to 1, only the main tests from the
non-regression testsuite are run.

When first argument of the `mt` script is `quick`, tests are run in
quick mode.

Goal is to complete the quick tests in a minute, rather the 10+ minutes
required by the full testsuite.
2021-07-24 14:06:09 +02:00
Xavier Delaruelle
5ea3d5d9e1 script: remove compat version-related code in mt/mb 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
95a469d453 script: remove compat version-related code in mrel/mpub 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
289e1a6348 Remove MODULES_USE_COMPAT_VERSION env variable 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
aaf29548bd script: remove createmodule.sh and createmodule.py
createmodule.sh and createmodule.py scripts are superseded by the
`sh-to-mod` sub-command that supports conversion from more shell
languages (ksh, zsh, fish, csh) and handles more environment changes
(alias, shell function).
2021-07-16 15:55:55 +02:00
Xavier Delaruelle
516c540109 script: re-license envml scripts from GPLv3+ to GPLv2+
Change license of envml and envml.cmd scripts from GPLv3+ to GPLv2+.

Align this way all files from the Modules project under the GPLv2+
license.

Consent has been obtained from the copyright holders (I and @jraphanel)
to perform such move. Consent from Jacques Raphanel was collected by
email.

Related to #389
2021-03-02 19:31:29 +01:00
Xavier Delaruelle
66c3490db8 script: re-license script from GPLv3+ to GPLv2+
Change license of mb, mlprof, modulecmd, mpub, mrel, mt, mtreview,
nglfar2ccov and playdemo scripts from GPLv3+ to GPLv2+.

Align this way all files from the Modules project under the GPLv2+
license.

Consent has been obtained from copyright holder to perform such move (I
hold the full copyright for these script files).

Related to #389
2021-02-28 19:05:22 +01:00
Xavier Delaruelle
05549e5336 script: correctly detect previous version tag on mpub
In case last bugfix release was made from a branch not parent of the
current branch from which the next release will be rolled out. List all
tags and get previous version name from the second to last position.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
d7b3cb0045 ts: add test env save/restore mechanism
Add the save_test_env and reset_test_env procedure to record original
test environment (global and environment variables) and restore it once
a test set has been done.
2020-12-06 20:38:44 +01:00
Xavier Delaruelle
3c883348ca doc/script: windows CI tests are now on GitHub Actions 2020-12-05 17:35:00 +01:00
Xavier Delaruelle
a39acdb7d6 script: add diff config for GHA in 'mtreview' 2020-12-05 17:34:59 +01:00
Xavier Delaruelle
6c94db0eee script: remove --base64-failed-log opt from mt script
Remove the --base64-failed-log option from the mt script as there is no
more need to output full test output serialized since the CI systems now
used can upload the test log files as artifact.
2020-12-05 17:34:59 +01:00
Xavier Delaruelle
a1f10ef8da script: add ability to select test to perform on 'mb' 2020-09-27 19:19:00 +02:00
Xavier Delaruelle
090d1e3b88 script: drop profiling of <4.4 releases in mb 2020-09-23 06:50:49 +02:00
Xavier Delaruelle
7a51140489 script: fix min version condition bench test 2020-09-18 06:50:26 +02:00
Xavier Delaruelle
ef419b262e script: build src with compat vers enabled on mrel 2020-09-16 06:09:28 +02:00
Xavier Delaruelle
e039eb9fac script: add avail3/whatis3 tests to mb
Bench new hide/forbid features mixed with advanced version specifiers
syntax. These new tests only apply to newer versions.
2020-09-02 06:09:17 +02:00
Xavier Delaruelle
1fb1bd8c79 script: clean trailing space character 2020-08-11 07:02:18 +02:00
Xavier Delaruelle
67dcfc3c89 script: add single module avail/whatis test on mb 2020-08-10 08:59:33 +02:00