API Sanity Checker Options

Contents

Information Options

  • -h|-help

Print this help.

  • -info

Print complete information.

  • -v|-version

Print version.

  • -dumpversion

Print the tool version and don't do anything else.

General Options

  • -l|-lib|-library <name>
Library name (without version). It affects only on the path and the title of the reports.
  • -d|-descriptor <path>
Path to the library descriptor. It may be one of the following:

1. XML-descriptor,
2. Directory with headers and libraries:

 perl api-sanity-checker.pl -lib NAME -d DIR1.0/ -gen -build -run

3. Comma separated list of headers and libraries:

 perl api-sanity-checker.pl -lib NAME -d HEADER.h,LIB.so -gen -build -run
If you are using an alternative descriptor type
then you should specify a version number with -vnum <ver> option too.
  • -gen|-generate
Generate test(s). Options -l and -d should be specified.
To generate test for the particular function use it with -f option.
Exit code: number of test cases failed to build.
  • -build|-make
Build test(s). Options -l and -d should be specified.
To build test for the particular function use it with -f option.
Exit code: number of test cases failed to generate.
  • -run
Run test(s), create test report. Options -l and -d should be specified.
To run test for the particular function use it with -f option.
Exit code: number of failed test cases.
  • -clean
Clean test(s). Options -l and -d should be specified.
To clean test for the particular function use it with -f option.
  • -vnum
Specify library version outside the descriptor.
  • -f|-function|-s|-symbol|-i|-interface <name>
Generate/Build/Run test for specified interface (mangled/symbol name in C++).
  • -functions-list|-symbols-list|-interfaces-list <path>
This option allow to specify a file with a list of functions
(one per line, mangled/symbol names in C++) that should be tested,
other library interfaces will not be tested.
  • -header <name>
This option allows to restrict a list of functions that should be tested
by providing a header file name in which they are declared. This option
was introduced for step-by-step tests development.
  • -xvfb
Use Xvfb-server instead of current X-server (by default) for running tests.
  • -t2c|-template2code
Generate tests in the universal Template2Code format.
  • -splint-specs
Read splint specifications (annotations) in the header files.
  • -strict-gen
Terminate the process of generating tests and return
error code '1' if cannot generate at least one test case.
  • -strict-build
Terminate the process of building tesst and return
error code '1' if cannot build at least one test case.
  • -strict-run
Terminate the process of running tests and return
error code '1' if at least one test case failed.
  • -strict
This option enables all -strict-* options.

Extra Options

  • -d-tmpl|-descriptor-template

Create library descriptor template 'lib_ver.xml' in the current directory.

  • -s-tmpl|-specialized-type-template

Create specialized type template 'spectypes.xml' in the current directory.

  • -r|-random

Random tests generating mode.

  • -min

Generate minimun code (as far as possible).

  • -max

Generate maximum code (as far as possible).

  • -show-retval

Show the function return type in the report.

  • -check-retval

Insert requirements on return values (retval!=NULL) for each called interface.

  • -st|-specialized-types <path>

Path to the collection of specialized types.

  • -td|-test-data <path>

Path to the directory with test data.

  • -headers-only
If the library is header-based and has no shared objects this option allows to generate tests for headers only.
  • -isolated
Allow to restrict functions usage by the lists specified by the -functions-list option
or by the group devision in the descriptor.
  • -view-only

Remove all files from the test suite except *.html files. This option allows to
create a lightweight html-index for all tests in the test suite.

  • -disable-default-values

Disable usage of default values for function parameters.

  • -p|-params <path>
Path to file with the function parameter names. It can be used for
improving generated tests if the library header files don't contain
parameter names.
File format:
func1;param1;param2;param3 ...
func2;param1;param2;param3 ...
...
  • -library-full-name <name>
Library name in the report title.
  • -relpath|-reldir <path>
Replace {RELPATH} in the library descriptor to <path>.
  • -debug
Write extended log for debugging.

Other Options

  • -test
Run internal tests. Create a simple library and run the tool on it.
This option allows to check if the tool works correctly on the system.
  • -time

Show expend time for generating, building and running tests.

  • -check-stdcxx-symbols

Enable checking of stdc++ interfaces from the library (for C++ libraries).

  • -disable-variable-reuse

Disable reusing of previously created variables.

  • -long-variable-names

Enable long (complex) variable names instead of short names (by default).