Commit Graph

57 Commits

Author SHA1 Message Date
Xavier Delaruelle
87f8e51823 ts/lib: test tcl ext lib against a zero res getgroups call
Add an utility library that supersedes the getgroups function from libc.
The getgroups function from this added library always returns an empty
result (0). It is used for coverage test of the getgroups call made
within the Envmodules_InitStateUsergroupsObjCmd function of the Tcl
extension library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
1675363e0e ts/lib: test tcl ext lib against a failed getgrgid call
Add an utility library that supersedes the getgrgid function from libc.
The getgrgid function from this added library always returns an error
(NULL). It is used for coverage test of the getgrgid call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
166096f4d8 ts/lib: test tcl ext lib against a failed getgroups call
Add an utility library that supersedes the getgroups function from libc.
The getgroups function from this added library always returns an error
(-1). It is used for coverage test of the getgroups call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
4542008335 ts/lib: test tcl ext lib against a failed getpwuid call
Add an utility library that supersedes the getpwuid function from libc.
The getpwuid function from this added library always returns an error
(NULL). It is used for coverage test of the getpwuid call made within
the Envmodules_InitStateUsernameObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
71d48f03c0 ts: test 'source-sh' modulefile command 2020-06-01 21:03:12 +02:00
Xavier Delaruelle
20b28d1091 ts: add test for path-like variable in 70/310 2020-06-01 20:59:50 +02:00
Xavier Delaruelle
f5991f09c6 ts: rework FOOSHELL var test in 70/310
Prefer BASH environment variable to SHELL to check bash binary location
used for current shell session.
2020-06-01 20:59:50 +02:00
Xavier Delaruelle
3dd6e43836 Add support for csh/tcsh shells on sh-to-mod sub-cmd 2020-06-01 20:59:50 +02:00
Xavier Delaruelle
49b9717130 Add support for fish shell on sh-to-mod sub-cmd 2020-06-01 20:59:50 +02:00
Xavier Delaruelle
2c68a96e11 ts: add tests for 'sh-to-mod' sub-command 2020-06-01 20:59:50 +02:00
Xavier Delaruelle
b06dcb3fc3 Migrate 'is_stderr_tty' state retrieval to getState 2020-06-01 20:58:04 +02:00
Xavier Delaruelle
dbcb53ef6a Migrate 'term_columns' state retrieval to getState 2020-06-01 20:58:04 +02:00
Xavier Delaruelle
3d249ddd27 ts: add names with space in test example initrc 2020-03-19 13:42:29 +01:00
Xavier Delaruelle
99853361b1 ts: add more error stack tests 2020-03-08 10:09:32 +01:00
Xavier Delaruelle
a39755a210 ts: test unknown issue throw in 00/120 2020-03-05 05:58:21 +01:00
Xavier Delaruelle
50c446842d ts: adapt autoinit output test for 'ml' 2020-01-09 20:38:50 +01:00
Xavier Delaruelle
44666a9e0b Adapt parseModuleVersionSpecifier proc mlspec
Add a 'mlspec' argument to the parseModuleVersionSpecifier procedure to
indicate module specification comes or not from the 'ml' command. A
slightly different processing is applied in this case as module name may
be prefixed by a '-' character when specified over the 'ml' command to
indicate this module should be unloaded.

When mlspec is enabled two lists are returned by
parseModuleVersionSpecifier: one for the list of the module to load and
another for the modules to unload.
2020-01-09 20:38:50 +01:00
Xavier Delaruelle
5c61844ebc ts: add tests to improve on-the-fly proc define coverage 2020-01-03 18:12:55 +01:00
Xavier Delaruelle
bcb148917d ts: add tests to improve modEq procs coverage 2020-01-03 18:12:49 +01:00
Xavier Delaruelle
ca0f397045 ts: adapt tests to new config option home 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
a7be90ae99 Update siteconfig.tcl files with new int config setup ways
Use the lappendConf procedure to set the locked_configs option and the
setConf procedure to set the avail_report_dir_sym and
avail_report_mfile_sym options.
2019-10-13 10:46:08 +02:00
Xavier Delaruelle
a61c67f643 ts: adapt tests to match new getConf debugging output 2019-10-13 10:46:08 +02:00
Xavier Delaruelle
85389164b5 ts: test initrc eval output during autoinit 2019-08-15 19:46:19 +02:00
Xavier Delaruelle
dbea39b5bd ts/lib: test tcl ext lib against a failed closedir call
Add an utility library that supersedes the closedir function from libc.
The closedir function from this added library always returns an error
(-1). It is used for coverage test of the closedir call made withing the
Envmodules_GetFilesInDirectoryObjCmd function of the Tcl extension
library.
2019-08-09 20:50:58 +02:00
Xavier Delaruelle
f9d090dc4f ts: test tcl ext lib procedures against erroneous calls 2019-08-08 22:15:43 +02:00
Xavier Delaruelle
81b3bcd2bf ts: load tcl ext lib by tclsh83 in 00/120 2019-08-08 21:16:43 +02:00
Xavier Delaruelle
7e8006942d Add ability to control message verbosity
Add a ``verbosity`` configuration option to define the default message
verbosity level (between a ``normal`` and a ``debug`` level). This
option could be set at ``./configure`` time with ``--with-verbosity``
option. It could be superseded with the ``MODULES_VERBOSITY``
environment variable, that could be set with ``config`` module
sub-command through the ``verbosity`` option.

Defining a ``debug`` verbosity level at the command-line level is still
achieved by using the ``-D`` or ``--debug`` command-line switches.
2019-07-23 09:50:42 +02:00
Xavier Delaruelle
fa1549d3f6 ts: test init modulerc that disables set_shell_startup 2019-07-07 15:56:47 +02:00
Xavier Delaruelle
ff145a56fc init: mention possible config set in modulerc 2019-07-05 21:42:34 +02:00
Xavier Delaruelle
1a52463b96 install: replaces --enable-extra-siteconfig with --with-locked-configs
Add to the configure script the --with-locked-configs option to ignore
environment variable superseding of Modules configurations defined in
modulecmd.tcl script. Lockable configuration option are extra_siteconfig.
Currently locked options are reported through the locked_configs option
on the config sub-command.

This new configure option replces --enable-extra-siteconfig which was
dedicated to the control over the MODULES_SITECONFIG variable.
2019-06-08 08:04:49 +02:00
Xavier Delaruelle
8f8b74398a Add ability to disallow MODULES_SITECONFIG
Add to the configure script the `--enable-extra-siteconfig` and
`--disable-extra-siteconfig` options to allow or forbid the definition
of a site-specific configuration script controlled with the
`MODULES_SITECONFIG` environment variable.

These options control the default value of the `g_extrasiteconfig`
variable in `modulecmd.tcl`. If this variable is true (by default),
MODULES_SITECONFIG is looked at the siteconfig sourcing time. Thus the
primary siteconfig.tcl can set the variable to false to ensure the
extra siteconfig is disabled whatever the option passed at ./configure
time.
2019-05-20 20:36:56 +02:00
Xavier Delaruelle
03fd7ea46e ts: superseded defs between siteconfig files 2019-05-14 06:32:30 +02:00
Xavier Delaruelle
22495fd5cf adding documentation and tests for MODULES_SITECONFIG 2019-05-09 07:25:34 +02:00
Xavier Delaruelle
098a4345a4 ts: check clear cmd confirmation msg 2019-05-05 11:30:40 +02:00
Xavier Delaruelle
25deb44e51 ts: test calling color initialization procedures twice 2019-05-03 21:37:28 +02:00
Xavier Delaruelle
f8fb60f119 ts: adapt existing tests for color 2019-05-03 14:01:22 +02:00
Xavier Delaruelle
6a35699a6e ts: improve getDiffBetweenList proc test coverage 2019-04-25 18:54:27 +02:00
Xavier Delaruelle
a36d19c311 ts: check getLoadedConflict proc in non-serialized mode 2019-02-27 06:38:28 +01:00
Xavier Delaruelle
b864c27ea5 ts: check getModuleFromLoadingModulefile proc in 00/120
Call procedure against a not loaded modulefile.
2019-02-26 13:59:09 +01:00
Xavier Delaruelle
cc0e63e82b Fix uninitialized 'rows' var in displayElementList proc
Add test case in 00-init/120-siteconfig to demonstrate a setup that
falls in the uninitialized 'rows' pit.

Fixes #195
2018-09-11 05:51:58 +02:00
Xavier Delaruelle
d8eb6c00e5 Remove g_force with path ref counting meaning
As a consequence a loaded module cannot be loaded a second time in force
mode. So the check of this situation in conflict procedure is not useful
anymore as the TESTSUITE_ENABLE_SITECONFIG_DEBUG non-regression test.
2018-07-22 08:22:16 +02:00
Xavier Delaruelle
1c0e888241 testsuite: fake win platform to check path var handling
Separator ';' is used instead of ':' on Windows platform. Add a test
leveraging siteconfig.tcl-1 to check path variable handling on a fake
Windows platform.

Set/get default path variable separator with new getPathSeparator
procedure. This way, global variable g_def_separator is defined after
parsing the siteconfig.tcl.
2018-03-15 06:00:57 +01:00
Xavier Delaruelle
51d3353325 Fetch terminal width on Windows with 'mode' cmd
Add test with fake 'mode' command to run on Linux.
2018-03-14 06:12:52 +01:00
Xavier Delaruelle
ccb794b332 testsuite: test lm accessor in 00-init/120-siteconfig 2018-03-07 07:26:52 +01:00
Xavier Delaruelle
e8e7cd3874 testsuite: file read w/o err report in 00/120-siteconfig 2018-03-04 14:51:17 +01:00
Xavier Delaruelle
dd7bea12c7 testsuite: load again conflict test in 50/130-conflict-full 2018-02-28 15:39:21 +01:00
Xavier Delaruelle
882520298b testsuite: terse+numbered disp test in 00/120-siteconfig 2018-02-28 14:36:33 +01:00
Xavier Delaruelle
878ff0087d testsuite: parseAccessIssue custom msg in 00/120-siteconfig 2018-02-28 10:20:25 +01:00
Xavier Delaruelle
b0c545827f testsuite: simulate solaris stty in 90-avail/070-full 2018-02-26 17:51:09 +01:00
Xavier Delaruelle
e340985d3b testsuite: no flag report test in 90-avail/070-full 2018-02-26 08:37:58 +01:00