moonunit detects, loads and invokes MoonUnit unit tests in dynamic shared objects and logs the results.
moonunit expects one or more shared objects containing unit tests to be specified as arguments.
In addition, the following options are available:
-t
, --test
library
/
suite
/
test
Run a test or subset of tests specified by library
,
suite
, and test
, which
may be globs. This option may be specified multiple times.
-a
, --all
Run all tests in all suites. This is the default behavior
if no instances of -t
are specified.
-d
, --debug
Causes moonunit to run all tests directly
rather than in a separate process and ignore the results.
This lets you run moonunit under a debugger
to inspect failing tests. Since running in this mode does
not enforce test isolation, you might want to use the
-t
to run just the failing test.
-l
, --logger
name
:key
=value
,...
Attempts to load and use the logger plugin name
.
name
may be followed by a colon and a comma-separated
list of key-value pairs to pass configuration options to the logger.
To obtain a list of configuration options, see --plugin-info.
The default is equivalent to console:ansi=true,columns=60
, which
produces colored, human-readable output on stdout.
-r
, --resource
file
Read in resource definitions from file
, which
should be a simple ini-style configuration file.
--list-tests
Prints a list of all tests available in the libraries passed on the command
line. If -t
is specified, only tests matching it are printed.
Each test is printed in the form that -t
accepts:
library
/
suite
/
test
.
--list-plugins
Prints a table showing all available plugins and what components (loader, harness, logger) they provide.
--plugin-info
name
Show detailed information about a plugin, including available configuration options.
-h
, --help
Lists brief usage and option information and exits.
moonunit library1.so library2.so
Run all unit tests in library1.so
and
library2.so
, printing results to the console.
moonunit -t Foo/bar -g library.so
Run test bar
in the suite Foo
in library.so
and trace any failures in GDB.
moonunit -l console:ansi=false library.so
Run all tests in library.so
, printing results to the console without
ANSI color.
moonunit -l xml:file=out.xml library.so
Run all tests in library.so
, writing the results
as XML to out.xml.