CLI Reference
Usage: aceunit [OPTION]... OBJECT_FILE...Generates the AceUnit fixture list from compiled test-case object files. The generated test suite is written to stdout.
Options
Section titled “Options”| Flag | Argument | Meaning |
|---|---|---|
-b BINARY |
tool binary | Use BINARY instead of the default for the selected tool. Example: -b m68k-amigaos-objdump. |
-h |
— | Display help and exit. |
-n NAME |
table name | Use NAME instead of fixtures for the generated fixture table symbol. |
-p PATTERN |
grep regex | Require this prefix before test-function names. PATTERN must be understood by grep. Example: -p '[^_]\+_' to allow any prefix followed by an underscore. |
-s PATTERN |
grep regex | Strip this prefix from symbol names before use. Example: -s _ to strip a leading underscore. |
-t TOOL |
nm | objdump | readelf |
Symbol-table tool to use. Defaults to objdump. |
-v |
— | Print version information and exit. |
Examples
Section titled “Examples”aceunit leapyear_test.o >testcases.cScans leapyear_test.o for test functions, writes generated fixtures to testcases.c.
aceunit -t nm -b m68k-amigaos-nm -s _ leapyear_test.o >testcases.cUses nm (specifically the m68k-amigaos-nm binary) to read the symbol table, stripping a leading underscore from symbol names — typical for cross-compiling to a target with an underscore-prefixed C ABI.
aceunit -t readelf a.o b.o c.o >testcases.cScans multiple object files at once, using readelf for the symbol table.
Symbol naming rules AceUnit looks for
Section titled “Symbol naming rules AceUnit looks for”Given the (optional) prefix from -p, AceUnit matches functions in each object file against:
${prefix}beforeAll${prefix}afterAll${prefix}beforeEach${prefix}afterEach${prefix}test*
See Core Concepts for what each of these does at runtime.