Commit Graph

116 Commits

Author SHA1 Message Date
Xavier Delaruelle
208a4d9d9c rpm/mrel: restore rpmlintrc and check srpm/rpms
Restore the various filter in rpmlintrc: they are useful to check srpm
and rpm files.

Update mrel to test to srpm and rpm files. Make a first test that
checks srpm and spec file. This test ignores the unused-rpmlintrc
warning, as it does not test rpm files. Then make a second test after
building the rpm files. This second test checks all files (spec, srpm
and rpms) to take into account any real unused-rpmlintrc issue.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-08-06 21:40:45 +02:00
Xavier Delaruelle
3e6ad82baa Move from wget to curl only rely on one tool
Instead of using wget and curl for different installation tasks, move
all usages to curl to only rely on one tool.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-08-06 21:40:45 +02:00
Xavier Delaruelle
47a07c12b6 script: test RPM build before dist in mrel
Update mrel to test RPM build before dist builds in order to pack the
tasks requiring sudo privileges in the early stages.

The acquired sudo token will this way still be valid for all mrel sudo
tasks. The regular lifetime of a sudo token is 5 minutes.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-08-02 07:26:54 +02:00
Xavier Delaruelle
d7fb931824 script: use user-writable dir for install tests in mrel
Change Modules build tests to install in a user-writable directory (in
/tmp). Sudo privileges are thus not needed anymore for this stage.

Remove the build test from the local git repository. This installation
style is covered by the installation test from the fetched repository.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-08-02 07:14:51 +02:00
Xavier Delaruelle
dc3f7b36c1 script: support koji "assigned" task state in mrel
Also improve koji taskinfo error reporting by providing full koji
output.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-08-02 06:45:44 +02:00
Xavier Delaruelle
20544ba445 script: fix mb to clean tcl file generated by old versions
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-06-22 14:41:59 +02:00
Xavier Delaruelle
f5acb1595b script: skip mb test for versions incompatible with Tcl 9
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-06-22 14:33:12 +02:00
Xavier Delaruelle
fbaaaaa858 script: sync gitlog2changelog.py with upstream
Update gitlog2changelog.py script with recent changes made on it in its
upstream repository (https://github.com/networkupstools/nut/, commit
e4739b9).

Keep our local adaptation:
* TextWrapper specific configuration

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-05-03 14:52:57 +02:00
Xavier Delaruelle
40c8958df9 Fix several typos found with codespell
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
2025-03-05 07:12:20 +01:00
Xavier Delaruelle
fde153fe22 Update repository URL to https://github.com/envmodules/modules 2024-12-13 20:52:13 +01:00
Xavier Delaruelle
3f9cdf1050 script: fix mrel when Lmod is installed on system 2024-12-11 06:37:59 +01:00
Xavier Delaruelle
9206a1688a Rename "contrib" directory into "share"
Give a more clear name to the "contrib" directory that contains
architecture and configuration independent data. New directory name is
"share", which correctly matches the destination of these files into the
installation directory.
2024-12-08 10:39:56 +01:00
Xavier Delaruelle
f7994a4aad script: report stats of each test case with issue on "mt" 2024-10-21 14:57:02 +02:00
Xavier Delaruelle
acea5b4b19 script: fix "mb" now modulecmd.tcl may exit with non-zero code 2024-10-21 13:45:09 +02:00
Simon Maertens
a66905338c install: add Windows install/testinstall scripts for pwsh 2024-09-15 15:02:51 +02:00
Xavier Delaruelle
97c76cd7e9 script: stop background log analysis once tests finished on mt 2024-08-18 20:47:48 +02:00
Xavier Delaruelle
185caa682e script: output testsuite run progress on mt 2024-06-09 14:25:19 +02:00
Xavier Delaruelle
fea0456d4f Use array size test result as boolean value
Simplify code to use result from "array size" command directly as
boolean value (0 means false, other numbers mean true).
2023-10-01 10:44:26 +02:00
Xavier Delaruelle
1b5df760d1 Use length test result as boolean value
Simplify code to use result from "string length" and "llength" commands
directly as boolean value (0 means false, other numbers mean true).
2023-10-01 10:36:49 +02:00
Xavier Delaruelle
e5f7f99689 script: fix bitwise AND logic on gitlog2changelog.py
Several if conditions where using bitwise AND whereas the intent was to
do a regular AND test.
2023-06-03 08:46:06 +02:00
Xavier Delaruelle
a1b82e75c2 Use Hunspell spell checker instead of Aspell
Following upcoming recommendation of Fedora to depreciate Aspell and
migrate to Hunspell [1]. Update documentation and scripts to use
Hunspell.

[1] https://fedoraproject.org/wiki/Changes/AspellDeprecation
2023-06-01 22:05:52 +02:00
Xavier Delaruelle
2d8360dbab script: apply flake8 suggestions on gitlog2changelog.py
Apply on gitlog2changelog.py most code change suggestions from Flake8
Python style guide enforcement tool.
2023-05-19 21:36:11 +02:00
Xavier Delaruelle
ff98426199 script: apply black suggestions on gitlog2changelog.py
Apply on gitlog2changelog.py code change suggestions from Black Python
code formatter.
2023-05-19 21:36:11 +02:00
Xavier Delaruelle
36f46feeec script: sync gitlog2changelog.py with upstream
Update gitlog2changelog.py script with recent changes made on it in its
upstream repository (https://github.com/networkupstools/nut/).

Keep our local adaptations:
* --pretty=medium git log option
* TextWrapper specific configuration

Remove one local adaptation (newline separator between commits) to obtain
more terse output.
2023-05-19 21:36:11 +02:00
Xavier Delaruelle
fc1ef21548 lint: fix SC2006 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
8db45670d7 lint: fix SC2016 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
38d400f409 lint: fix SC2076 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
47822de203 lint: fix SC2206 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
3bf57cc7d7 lint: fix SC2209 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
00d57b3d82 lint: fix SC2181 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
3a85fb43fd lint: fix SC2268 shellcheck warning 2023-05-19 21:36:11 +02:00
Xavier Delaruelle
a185599f4e lint: fix SC2164 shellcheck warning 2023-05-18 18:43:09 +02:00
Xavier Delaruelle
2506e7e42c script: test some builds with quick testsuite on mrel
Use quick testsuite on git clone and git export builds to speed-up a bit
new release test.
2023-05-15 20:45:16 +02:00
Xavier Delaruelle
2835f6bbb3 install: fix expected log format in gitlog2changelog.py
Update gitlog2changelog.py script to ensure git log format is not
influenced by user git configuration.

Fixes #487.
2023-03-21 06:03:35 +01:00
Xavier Delaruelle
1cd8a67b52 ts: optionally build cache files to run tests
When TESTSUITE_ENABLE_MODULECACHE environment variable is set, cache
file is built for all modulepaths of the testsuite. Tests are run using
the cache files to resolve available modules.
2022-12-27 18:43:59 +01:00
Xavier Delaruelle
3cffd66915 script: skip v5.2 from bench/profile in mb
Ignore Modules v5.2 when benching or profiling releases not to get too
much results on output.
2022-12-24 17:24:52 +01:00
Xavier Delaruelle
50171b10fa script: add benchmark tests for cache in mb
Add cache version of avail, whatis and load benchmark tests in mb tool.
2022-12-24 17:24:52 +01:00
Xavier Delaruelle
3b1faeb181 Use main as new name for default git branch 2022-10-30 13:26:31 +01: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
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