|
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.
|
|
|
|
(no translation yet)
|
|
|
|
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::
|
|
|
|
Más adelante vamos a ver el paquete fuente ``glib2.0``. En un caso muy simple el archivo podría tener la siguiente forma::
|
|
Translated by
Jose Luis Tirado
|
|
|
|
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.
|
|
|
|
Para la prueba de ``debian/tests/build`` esto se aseguraría que los paquetes ``libglib2.0-dev`` y ``build-essential`` están instalados.
|
|
Translated by
Jose Luis Tirado
|
|
|
|
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.
|
|
|
|
Puede usar ``@`` en la línea ``Depends`` para indicar que desea que estén instalados todos los paquetes que son compilados por el paquete fuente en cuestión.
|
|
Translated by
Jose Luis Tirado
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:31
|
|
10.
|
|
|
The actual tests
|
|
|
|
La prueba real
|
|
Translated by
Jose Luis Tirado
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:37
|
|
11.
|
|
|
The accompanying test for the example above might be:
|
|
|
|
La prueba asociada al ejemplo anterior podría ser:
|
|
Translated by
Jose Luis Tirado
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:39
|
|
12.
|
|
|
Here a very simple piece of C code is written to a temporary directory. Then this is compiled with system libraries (using flags and library paths as provided by `pkg-config`). Then the compiled binary, which just exercises some parts of core glib functionality, is run.
|
|
|
|
Aquí una porción de código C muy simple se escribe en un directorio temporal. Luego es compilada con las bibliotecas del sistema (usando los marcadores y rutas de bibliotecas proporcionadas por `pkg-config`). Luego el binario compilado, que simplemente prueba algunas partes de la funcionalidad del núcleo de glib, se ejecuta.
|
|
Translated by
Jose Luis Tirado
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:71
|
|
13.
|
|
|
While this test is very small and simple, it covers quite a lot: that your -dev package has all necessary dependencies, that your package installs working pkg-config files, headers and libraries are put into the right place, or that the compiler and linker work. This helps to uncover critical issues early on.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:76
|
|
14.
|
|
|
Executing the test
|
|
|
|
Ejecutando la prueba
|
|
Translated by
Jose Luis Tirado
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:82
|
|
15.
|
|
|
While the test script can be easily executed on its own, it is strongly recommended to actually use ``autopkgtest`` from the ``autopkgtest`` package for verifying that your test works; otherwise, if it fails in the Ubuntu Continuous Integration (CI) system, it will not land in Ubuntu. This also avoids cluttering your workstation with test packages or test configuration if the test does something more intrusive than the simple example above.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:84
|