Run a worker even with -j 1
What
This MR causes Tezt to run in multi-process mode even with -j 1. Tezt still runs in single-process mode if -j is not specified at all.
Why
Tezt cannot measure memory usage of tests in single-process mode. Yet, it can still be useful to measure memory usage even when not running multiple tests in parallel.
Multi-process mode has other benefits, such as a better handling of timeouts. So -j 1 is useful in those cases as well.
How
Cli.Options.job_count is now an int option instead of an int, so that we can distinguish between "no -j" and -j 1.
Manually testing the MR
Without -j, --mem-warn has no effect:
dune exec test/unix/main.exe -- --mem-warn 100000 --mem-poll-frequency 10000
With -j 1, --mem-warn works:
dune exec test/unix/main.exe -- --mem-warn 100000 --mem-poll-frequency 10000 -j 1
Checklist
-
Update CHANGES.md. No need to document changes to documentation and tests. -
Make sure all new values, types etc. are documented in .mlifiles and that the generated documentation looks ok. -
Add tests in test/, if relevant.