Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
tests/README
1. Summary
The global test target, i.e. "make test", should be executed prior to
requesting code review and prior to integration. That target invokes
run.py in this directory.
run.py drives the execution of our api and cli test suites, and
compares the results to a baseline file stored in baseline.txt.
run.py can also be run standalone with a variety of options.
Use "run.py -h" to see what options are supported.
To run subsets of tests or individual tests, use the "-o" or the "-s"
options to select what tests to run.
For example:
- To run the tests in cli/t_pkg_install.py:
$ run.py -o cli.t_pkg_install
- To run just the tests in the TestPkgInstallActions class in that file:
$ run.py -o cli.t_pkg_install.TestPkgInstallActions
- To run just the "test_bad_hardlinks" test:
$ run.py -o cli.t_pkg_install.TestPkgInstallActions.test_bad_hardlinks
When adding, removing, or changing the results of test cases, make
sure to update baseline.txt and check it in. This can be done with the
-g option to run.py.
The code coverage collection is done with Ned Batchelder's "coverage.py"
tool [1].
2. References
[1] N. Batchelder, coverage module, 2009.
http://nedbatchelder.com/code/coverage/