Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I contribute an autopkg test for a ubuntu package?

share|improve this question
add comment

1 Answer

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:

  1. Branch the package bzr branch ubuntu:
  2. Add a source section in debian/control called XS-Testsuite: autopkgtest
  3. Add the tests to debian/tests/ folder
  4. Add a debian/tests/control which specifies the requirements for the testbed. For example:
Tests: build
Depends: build-essential

Contributing tests

Getting the test into ubuntu follows the normal ubuntu developer process. In short, you

  1. Branch the source of the package you wish to add a test
  2. Edit the debian/control and debian/tests/control file to enable the tests
  3. Add the test(s) to debian/tests folder
  4. Commit your changes and propose a merge

More information

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.