|
11.
|
|
|
The accompanying test for the example above might be:
|
|
|
|
Der passende Test für das obige Beispiel könnte folgender sein:
|
|
Translated and reviewed by
Daniel Holbach
|
|
|
|
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.
|
|
|
|
An dieser Stelle wird ein sehr einfaches Stück C-Code in ein temporäres Verzeichnis geschrieben. Dies wird mit den Systembibliotheken übersetzt (wobei die Flags und Bibliothekpfade benutzt werden, wie sie uns von `pkg-config` geliefert werden). Dann wird der resultierende Binär-Code ausgeführt, der grundlegende Funtionen in glib testet.
|
|
Translated and reviewed by
Daniel Holbach
|
|
|
|
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.
|
|
|
|
Während der Test selbst sehr klein und einfach ist, umfasst er doch eine Menge: Es wird sichergestellt, dass das -dev Paket alle nötigen Abhängigkeiten besitzt, dass von dem Paket funktionierende pkg-Konfigurationsdateien installiert werden, dass die Header und Bibliotheken richtig platziert werden, oder dass der Kompiler und Linker funktionieren. Das hilft dabei, kritische Fehler schon sehr früh aufzudecken.
|
|
Translated by
Moritz Oberhauser
|
|
Reviewed by
Daniel Holbach
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:76
|
|
14.
|
|
|
Executing the test
|
|
|
|
Den Test ausführen
|
|
Translated and reviewed by
Daniel Holbach
|
|
|
|
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.
|
|
|
|
Während das Testskript leicht selbst ausgeführt werden kann, wird dringend empfohlen, ``autopkgtest`` aus dem ``autopkgtest`` Paket zu verwenden. Somit kann überprüft werden, dass Ihr Test funktioniert. In anderen Fällen wird es der Test wenn er im Ubuntu Continuous Integration (CI) System fehlschlägt, nicht in Ubuntu landen. Dies verhindet eben so, dass Ihre Workstation mit Testpaketen oder Testkonfiguration zugemüllt wird, wenn der Test etwas weiteres als das einfache Beispiel oben macht.
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:84
|
|
16.
|
|
|
The `README.running-tests <running_tests_local_>`_ (`online version <DEP8_>`_) documentation explains all available testbeds (schroot, LXD, QEMU, etc.) and the most common scenarios how to run your tests with ``autopkgtest``, e. g. with locally built binaries, locally modified tests, etc.
|
|
|
|
Die `README.running-tests <running_tests_local_>`_ (`online version <DEP8_>`_) Dokumentation erklärt alle verfügbaren Testumgebund (schroot, LXE, QEMU etc.) und die üblichsten Szenarien um Ihre Tests mit ``autopkgtest`` laufen zu lassen. Beispielsweise mit lokal erstellten Binärdateien, lokal modifizierten Tests etc.
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:91
|
|
17.
|
|
|
The Ubuntu CI system uses the QEMU runner and runs the tests from the packages in the archive, with ``-proposed`` enabled. To reproduce the exact same environment, first install the necessary packages::
|
|
|
|
Das Ubuntu CI-System benutzt den QEMU-Runner und führt alle Tests der Pakete in des Archivs aus, welche ``-proposed`` aktiviert haben. Um genau die selbe Umgebung zu reproduzieren, müssen zuerst die nötigen Pakten installiert werden::
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:97
|
|
18.
|
|
|
Now build a testbed with::
|
|
|
|
Nun erstellen Sie eine Testumgebung mit::
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:103
|
|
19.
|
|
|
(Please see its manpage and ``--help`` output for selecting different releases, architectures, output directory, or using proxies). This will build e. g. ``adt-trusty-amd64-cloud.img``.
|
|
|
|
(Bitte beachten Sie die Manpage und die ``--help`` Ausgabe zur Auswahl von verschiedenen Veröffentlichungen, Architekturen, Ausgabeverzeichnis oder die Nutzung von Proxies). Dies baut beispielsweise `adt-trusty-amd64-cloud.img``.
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:107
|
|
20.
|
|
|
Then run the tests of a source package like ``libpng`` in that QEMU image::
|
|
|
|
Dann starte die Tests eines Quellpakets wie ``libpng`` in diesem QEMU-Abbild::
|
|
Translated by
Maik Wagner
|
|
|
|
Located in
../ubuntu-packaging-guide/auto-pkg-test.rst:111
|