|
3.
|
|
|
add a file called ``debian/tests/control`` which specifies the requirements for the testbed,
|
|
|
|
додати файл ``debian/tests/control``, який визначає вимоги до тестового оточення,
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:9
|
|
4.
|
|
|
add the tests in ``debian/tests/``.
|
|
|
|
додати тести в ``debian/tests``.
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:11
|
|
5.
|
|
|
Testbed requirements
|
|
|
|
Вимоги до тестового оточення
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
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 and reviewed by
Mykola Tkach
|
|
|
|
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 and reviewed by
Mykola Tkach
|
|
|
|
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 and reviewed by
Mykola Tkach
|
|
|
|
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 and reviewed by
Mykola Tkach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:31
|
|
10.
|
|
|
The actual tests
|
|
|
|
Поточні тести
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:37
|
|
11.
|
|
|
The accompanying test for the example above might be:
|
|
|
|
Тест, що відповідає розглянутому вище прикладу, буде виглядати так:
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
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.
|
|
|
|
Тут невелика проґрама мовою C копіюється у тимчасову теку, потім компілюється з використанням системних бібліотек (з використанням прапорців та шляхів до бібліотек, визначених через ``pkg-config``). Потім запускається скомпільований файл, який запускає декілька основних функцій glib.
|
|
Translated and reviewed by
Mykola Tkach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:71
|