Hello Ben,
Le lun. 18 juil. 2022 à 15:11, Ben Bowers <nan...@gm...> a écrit :
> Hello modules developers/maintainers,
>
> Some questions/comments about the tests included with modules:
>
> 1) it takes me about 12 minutes of runtime to run the tests. Is there
> some option to parallelize or get through the tests quicker? (I do realize
> there are ~17000 tests/asserts)
>
There is a lightweight version of the testsuite (~1000 tests, takes
~1minute to run) that could be invoked with:
$ make test QUICKTEST=1
Then there is the "mt" helper script that enables to run just some parts of
the testsuite
> 2) Per comment #1 above, there appears to be a helper script named "mt" -
> I seemed to remember this from a long time ago... This doesn't look like it
> is documented in the CONTRIBUTING.rst document, but seems like it would be
> a worthy addition, because running the full test suite takes a long time.
> "mt" has neither a help message nor any in-script documentation examples on
> how to run and it took more than a few tries to figure out how to get it to
> run properly. Any thoughts on where MT should be documented - in the
> script vs. in the contributing document, or both?
>
In the contributing document and it should also get a -h/--help option to
output a usage message.
> 3) When working on a branch, I got unexpected failures from ~130 tests
> because my local branch name (test_mode_mimic) used underscores, which
> caused tests to fail since the regex expects the version to only contain
> alphanumeric characters, or dot / plus / dash :
> ERR[65]: 'Modules Release 5.1.1+test_mode_mimic-107-g5b9dbfac (2022-07-17)
> EXP[53]: '^Modules Release [0-9a-zA-Z\.\+\-]+ \([0-9\-]{10}\)
> I was able to correct this by renaming my branch to "test-mode-mimic". I
> did not notice this restriction documented anywhere, would it be
> appropriate to add to the CONTRIBUTING.rst ?
> Or should the regex be updated to allow underscores in the version name?
>
The regexp should be updated to allow underscores in the version name.
> 4) Slightly off topic - It would be nice if the makefile had a help
> target. There are ways to embed special comments in makefiles to make it
> self-documenting, per Self-Documented Makefile (marmelab.com)
> <https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html>
>
I would be interesting to add such help target. It would be great if the
relative code could only rely on 'sed', as the Makefile does not depend on
grep and awk currently.
> I could take a crack at these if they are of interest.
>
It would be great for sure. Do you mean 2, 3 and 4 or just 4 ?
Best regards,
Xavier
|