Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/linux_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
eval $EXTRA_SCRIPT_PRETEST
make test-deps
xvfb-run script/mt
xvfb-run script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -80,8 +80,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

tcl85-nolibtclenvmodules:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -142,7 +144,7 @@ jobs:
run: |
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -168,8 +170,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

tcl85-2:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -226,7 +230,7 @@ jobs:
run: |
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -252,8 +256,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

tcl86:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -295,7 +301,7 @@ jobs:
set -e
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -321,8 +327,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

tcl85:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -366,7 +374,7 @@ jobs:
set -e
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -392,8 +400,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

tcl91:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -453,7 +463,7 @@ jobs:
run: |
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(nproc)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
working-directory: modules-1.2.3+branch_name-91-g6dd3db49
Expand All @@ -473,8 +483,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules-1.2.3+branch_name-91-g6dd3db49/modules.log
modules-1.2.3+branch_name-91-g6dd3db49/.testshards/*/modules.log
modules-1.2.3+branch_name-91-g6dd3db49/install.log
retention-days: 5
include-hidden-files: true

tcl90:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -513,7 +525,7 @@ jobs:
- name: Test Modules build
run: |
make test-deps
script/mt
script/mt -j "$(nproc)"
- name: Install Modules
run: |
make install
Expand All @@ -538,8 +550,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

el8:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -585,7 +599,7 @@ jobs:
- name: Test Modules build
run: |
make test-deps
xvfb-run script/mt
xvfb-run script/mt -j "$(nproc)"
- name: Install Modules
run: |
make install
Expand All @@ -604,8 +618,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
/__w/modules/modules/modules.log
/__w/modules/modules/.testshards/*/modules.log
/__w/modules/modules/install.log
retention-days: 5
include-hidden-files: true

el9:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -640,7 +656,7 @@ jobs:
- name: Test Modules build
run: |
make test-deps
script/mt
script/mt -j "$(nproc)"
- name: Install Modules
run: |
make install
Expand All @@ -659,5 +675,7 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
/__w/modules/modules/modules.log
/__w/modules/modules/.testshards/*/modules.log
/__w/modules/modules/install.log
retention-days: 5
include-hidden-files: true
4 changes: 3 additions & 1 deletion .github/workflows/macos_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
done
eval $EXTRA_SCRIPT_PRETEST
make test-deps
script/mt
script/mt -j "$(sysctl -n hw.ncpu)"
eval $EXTRA_SCRIPT_POSTTEST
- name: Install Modules
run: |
Expand All @@ -75,5 +75,7 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true
14 changes: 12 additions & 2 deletions .github/workflows/windows_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ jobs:
run: |
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure && make'
- name: Test Modules build
timeout-minutes: 60
run: |
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && script/mt'
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && script/mt -j "$(nproc)"'
- name: Install Modules
run: |
bash -lc 'cd $(cygpath -u "$GITHUB_WORKSPACE") && make install'
Expand All @@ -186,8 +187,10 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true

msys:
runs-on: windows-2022
Expand Down Expand Up @@ -215,8 +218,13 @@ jobs:
make
- name: Test Modules build
shell: msys2 {0}
timeout-minutes: 60
# symbolic links are created as copies by default on MSYS2, which is
# unfit for the shard directories of a parallel run
env:
MSYS: winsymlinks:native
run: |
script/mt
script/mt -j "$(nproc)"
- name: Install Modules
shell: msys2 {0}
run: |
Expand All @@ -235,5 +243,7 @@ jobs:
name: testsuite-logs-${{ github.job }}
path: |
modules.log
.testshards/*/modules.log
install.log
retention-days: 5
include-hidden-files: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/version.inc
/modules.log
/modules.sum
/.testshards
/install.log
/install.sum
/lint.log
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ a failing one.
```sh
make test # full suite via DejaGnu (~25,000 cases, ~12 min)
make test QUICKTEST=y # quick mode, most essential tests (~1,900 cases, ~1 min)
make test JOBS=8 # full suite, test files run concurrently by 8 jobs
make testinstall # test an already-`make install`ed tree
```

Expand All @@ -67,6 +68,7 @@ Coverage (uses Nagelfar):

```sh
make test COVERAGE=y # then inspect tcl/*.tcl_m for ';# Not covered' lines
make test COVERAGE=y JOBS=8 # same, test files run concurrently by 8 jobs
script/mt cov 70/{280,290} # coverage run on selected testfiles
```

Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ rpm: dist-bzip2

clean:
rm -f *.log *.sum
rm -rf .testshards
rm -f tcl/*.tcl_i tcl/*.tcl_log tcl/*.tcl_m
rm -rf coverage
# do not clean generated docs if not in git repository
Expand Down Expand Up @@ -1048,11 +1049,20 @@ test-deps: $(TEST_PREREQ)

# if coverage enabled create markup file for better read coverage result
test: $(TEST_PREREQ)
ifeq ($(JOBS),)
TCLSH=$(TCLSH); export TCLSH; \
MODULECMD=$(MODULECMD); export MODULECMD; \
OBJDIR=`pwd -P`; export OBJDIR; \
TESTSUITEDIR=`cd testsuite;pwd -P`; export TESTSUITEDIR; \
runtest --srcdir $$TESTSUITEDIR --objdir $$OBJDIR $(RUNTESTFLAGS) --tool modules $(RUNTESTFILES)
else
TCLSH=$(TCLSH); export TCLSH; \
MODULECMD=$(MODULECMD); export MODULECMD; \
OBJDIR=`pwd -P`; export OBJDIR; \
TESTSUITEDIR=`cd testsuite;pwd -P`; export TESTSUITEDIR; \
RUNTESTFLAGS="$(RUNTESTFLAGS)"; export RUNTESTFLAGS; \
expect script/mpt -j $(JOBS) $(RUNTESTFILES)
endif
ifeq ($(COVERAGE),y)
$(NAGELFAR) -markup tcl/cache.tcl
$(NAGELFAR) -markup tcl/coll.tcl
Expand Down
9 changes: 9 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ Modules 5.8.0 (not yet released)
* Doc: add :ref:`add-new-command-line-switch` guide describing how to
contribute a new command line switch or accept an existing one on an
additional sub-command.
* Evaluate the shell script of :mfcmd:`source-sh` modulefile command and
:subcmd:`sh-to-mod` sub-command with an empty standard input, as script is
run to collect its environment changes and some shells start an interactive
session when a terminal is found on their standard input.
* Testsuite: add ``JOBS`` option to ``make test`` and ``-j`` option to
:file:`script/mt` to run the test files of the ``modules`` testsuite
concurrently, each group of files being run in a private copy of the
testsuite directory. Coverage mode (``COVERAGE=y``) is supported, the
coverage logs of each group of files are merged at the end of the run.


.. _5.7 release notes:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/devel/add-new-sub-command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ not drop.
#. Test the sub-command against an invalid number of arguments (too few and
too many).

- File to edit: :file:`testsuite/modules.00-init/071-args.exp`
- File to edit: :file:`testsuite/modules.01-general/071-args.exp`
- Example commit: :ghcommit:`086ac136`

#. If the new sub-command cannot be called from a modulefile evaluation, test
Expand Down
Loading
Loading