|
1.
|
|
|
autopkgtest: Automatic testing for packages
|
|
|
|
autopkgtest: Автоматическое тестирование пакетов
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:3
|
|
2.
|
|
|
The `DEP 8 specification <DEP8_>`_ defines how automatic testing can very easily be integrated into packages. To integrate a test into a package, all you need to do is:
|
|
|
|
`Спецификация DEP 8 <DEP8_>`_ определяет, как можно легко интегрировать автоматическое тестирование в ваши пакеты. Для этого, необходимо:
|
|
Translated by
Mark Vartanyan
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:5
|
|
3.
|
|
|
add a file called ``debian/tests/control`` which specifies the requirements for the testbed,
|
|
|
|
добавить файл ``debian/tests/control``, который определяет требования к тестовому окружению,
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:9
|
|
4.
|
|
|
add the tests in ``debian/tests/``.
|
|
|
|
добавить тесты в ``debian/tests``.
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:11
|
|
5.
|
|
|
Testbed requirements
|
|
|
|
Требования к тестовому окружению
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:15
|
|
6.
|
|
|
In ``debian/tests/control`` you specify what to expect from the testbed. So for example you list all the required packages for the tests, if the testbed gets broken during the build or if ``root`` permissions are required. The `DEP 8 specification <DEP8_>`_ lists all available options.
|
|
|
|
В файле ``debian/tests/control`` вы можете определить требования к тестовому окружению. Например, если тесты не проходят при сборке, или требуются права ``root`` -- вы перечисляете необходимые для тестов пакеты. В `Спецификации DEP 8 <DEP8_>`_ вы найдёте все доступные опции.
|
|
Translated by
Mark Vartanyan
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:17
|
|
7.
|
|
|
Below we are having a look at the ``glib2.0`` source package. In a very simple case the file would look like this::
|
|
|
|
Ниже мы рассмотрим пакет исходного кода ``glib2.0``. В очень простом случае он будет выглядеть так::
|
|
Translated by
Anton Patsev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:22
|
|
8.
|
|
|
For the test in ``debian/tests/build`` this would ensure that the packages ``libglib2.0-dev`` and ``build-essential`` are installed.
|
|
|
|
Это будет означать, что для теста ``debian/tests/build`` требуются пакеты ``libglib2.0-dev`` и ``build-essential``.
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:28
|
|
9.
|
|
|
You can use ``@`` in the ``Depends`` line to indicate that you want all the packages installed which are built by the source package in question.
|
|
|
|
В поле ``Depends`` можно указать ``@``, если вы хотите установки всех бинарных пакетов, собранных из рассматриваемого пакета исходного кода.
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:31
|
|
10.
|
|
|
The actual tests
|
|
|
|
Настоящие тесты
|
|
Translated by
Dmitry Shachnev
|
|
Reviewed by
Anton Patsev
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:37
|