Title: autopkgtest - automatic as-installed package testing
DEP: 8
State: DRAFT
Date: 2011-02-27
Drivers: Ian Jackson <ijackson@chiark.greenend.org.uk>,
 Iustin Pop <iustin@debian.org>,
 Stefano Zacchiroli <zack@debian.org>
URL: http://dep.debian.net/deps/dep8
Source: http://anonscm.debian.org/viewvc/dep/web/deps/dep8.mdwn
License:
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
 notice and this notice are preserved.
Abstract:
 Establish a standard interface to define and run "as-installed" tests of
 packages, i.e. the testing of packages in a context as close as possible
 to a Debian system where the packages subject to testing are properly
 installed.
  1. Introduction
  2. Appendix A - original specification

Introduction

In the working.

In the meantime you can check the original specification below, which is currently implemented by the autopkgtest package.


Appendix A - original specification

Introduction

This document describes how the autopkgtest tester core (the program adt-run) interprets and executes tests found in source packages.

The source package provides a test metadata file debian/tests/control. This is a file containing zero or more RFC822-style stanzas, along these lines:

Tests: fred bill bongo
Restrictions: needs-root breaks-computer

This example defines three tests, called fred, bill and bongo. The tests will be performed by executing debian/tests/fred, debian/tests/bill, etc. Each test program should, on success, exit with status 0 and print nothing to stderr; if a test exits nonzero, or prints to stderr, it is considered to have failed.

The cwd of each test is guaranteed to be the root of the source package which will have been built. HOWEVER note that the tests must test the INSTALLED version of the program. Tests may not modify the source tree (and may not have write access to it).

If the file to be executed has no execute bits set, chmod a+x is applied to it (this means that tests can be added in patches without the need for additional chmod; contrast this with debian/rules).

During execution of the test, the environment variable TMPDIR will point to a directory for the execution of this particular test, which starts empty and will be deleted afterwards (so there is no need for the test to clean up files left there).

Tests must declare all applicable Restrictions - see below.

The fields which may appear in the RFC822-style stanza are:

Any unknown fields will cause the whole stanza to be skipped.

Restrictions

The defined Restrictions are:

Features

The currently defined Features are: