Runs the unit tests for all of Gaffer’s python modules and libraries. These are run automatically as part of Gaffer’s build and review process, but it is useful to run them manually when developing for Gaffer or troubleshooting an installation.
Run all the tests :
Run all the tests for the scene module :
gaffer test GafferScene
Repeat a specific test 10 times :
gaffer test -repeat 10 GafferImageTest.ImageNodeTest.testCacheThreadSafety
Prints names and descriptions of each parameter rather than running the application.
The maximum number of threads used for computation. The default value of zero matches the number of threads to the available hardware cores. Negative values specify a thread count relative to the available cores, leaving some in reserve for other applications. Positive values specify the thread count explicitly, but are clamped so it does not exceed the available cores.
If this is specified, then the application is run using the cProfile profiling module, and the results saved to the file for later examination.
A list of names of specific test cases to run. If unspecified then all test cases are run.
The number of times to repeat the tests.
Only runs tests matching certain categories. Accepts a space-separated list of categories, optionally containing wildcards. Use
-showCategories to see a list of available categories. Use the
TestRunner.Categories decorator to assign categories.
Excludes tests matching certain categories. Accepts a space-separated list of categories, optionally containing wildcards.
Prints a list of available test categories to
The name of a JSON file that the results are written to.
The name of a JSON file containing the results of a previous test run. This will be used to detect and report performance regressions.
Stops on the first failure, instead of running the remaining tests.