How do I contribute an autopkg test for a ubuntu package?
Autopkg tests can be written for any ubuntu package. The tests follow the DEP 8 specification for including tests as part of a deb package.
Writing a test
A test can be written in a myriad of languages. Common examples are C, bash, python and perl. To write a test:
- Branch the package bzr branch ubuntu:
- Add a source section in debian/control called XS-Testsuite: autopkgtest
- Add the tests to debian/tests/ folder
- Add a debian/tests/control which specifies the requirements for the testbed. For example:
Tests: build Depends: build-essential
Getting the test into ubuntu follows the normal ubuntu developer process. In short, you
- Branch the source of the package you wish to add a test
- Edit the debian/control and debian/tests/control file to enable the tests
- Add the test(s) to debian/tests folder
- Commit your changes and propose a merge
To see a list of current autopkgtests, you can see the live jenkins output of all the tests that are currently being automatically run here.
In addition, the ubuntu developer documentation has further information on contributing an autopkg testcase, including examples of tests.