Next: , Previous: The runtests program, Up: Unit testing


8.2.5 Running the unit tests

The runtests program will run all the defined unit tests of the library. It can be invoked (and it is the preferred way) by executing:

     $ make check

It is possible to run the unit tests corresponding to a specific library module by using the MODULE variable:

     $ make check MODULE=fsys

It is also possible to run the unit tests corresponding to a specific public function by using the FUNCTION variable:

     $ make check FUNCTION=fsys_close_file

The test driver display several messages to the standard output and also dump a logfile named ut.log with details about the test execution.

The runtests program will (by default) output a list of which test suites were run, then a summary line followed by a list of failing lists. You can get a full list of tests (passing and failing) by setting the CK_VERBOSITY environment variable to 'verbose'. You can get just the summary line and failing lists by setting the CK_VERBOSITY environment variable to 'minimal', and you can produce no output by setting it to 'silent'. Note that tests (in particular, the error reporting tests) may output additional information as part of their normal operation - that isn't really part of the check testing framework, and won't be affected by the CK_VERBOSITY environment variable.

If the library was cross compiled in a GNU system using mingw32, make check will try to invoke wine to execute the runtests.exe binary. If the compilation was performed in a native windows environment then runtests.exe will be used directly.