Commit Graph

6 Commits

Author SHA1 Message Date
furszy
2f4546ce56 test: add --log option to display tests execution
When enabled (--log=1), shows test start, completion, and execution time.
2025-10-01 10:19:05 -04:00
furszy
95b9953ea4 test: Add option to display all available tests
Useful option to avoid opening the large tests.c file just to find
the test case you want to run.
2025-10-01 10:19:05 -04:00
furszy
953f7b0088 test: support running specific tests/modules targets
Add support for specifying single tests or modules to run via the
"--target" or "-t" command-line option. Multiple targets can be
provided; only the specified tests or all tests in the specified
module/s will run instead of the full suite.

Examples:
-t=<test name> runs an specific test.
-t=<module name> runs all tests within the specified module.

Both options can be provided multiple times.
2025-10-01 10:19:05 -04:00
furszy
0302c1a3d7 test: add --help for command-line options
Add a help message for the test suite, documenting available options,
defaults, and backward-compatible positional arguments.
2025-10-01 10:17:57 -04:00
furszy
9ec3bfe22d test: adapt modules to the new test infrastructure
This not only provides a structural improvement but also
allows us to (1) specify individual tests to run and (2)
execute each of them concurrently.
2025-10-01 10:17:57 -04:00
furszy
48789dafc2 test: introduce (mini) unit test framework
Lightweight unit testing framework, providing a structured way to define,
execute, and report tests. It includes a central test registry, a flexible
command-line argument parser of the form "--key=value" / "-k=value" /
"-key=value" (facilitating future framework extensions), ability to run
tests in parallel and accumulated test time logging reports.

So far the supported command-line args are:
- "--jobs=<num>" or "-j=<num>" to specify the number of parallel workers.
- "--seed=<hex>" to specify the RNG seed (random if not set).
- "--iterations=<num>" or "-i=<num>" to specify the number of iterations.

Compatibility Note:
To stay compatible with previous versions, the framework also supports
the two original positional arguments: the iterations count and the
RNG seed (in that order).
2025-10-01 10:17:57 -04:00