summaryrefslogtreecommitdiffstats
path: root/tests/packaging/README.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:41:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:41:58 +0000
commit1852910ef0fd7393da62b88aee66ee092208748e (patch)
treead3b659dbbe622b58a5bda4fe0b5e1d80eee9277 /tests/packaging/README.rst
parentInitial commit. (diff)
downloadknot-resolver-1852910ef0fd7393da62b88aee66ee092208748e.tar.xz
knot-resolver-1852910ef0fd7393da62b88aee66ee092208748e.zip
Adding upstream version 5.3.1.upstream/5.3.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/packaging/README.rst')
-rw-r--r--tests/packaging/README.rst87
1 files changed, 87 insertions, 0 deletions
diff --git a/tests/packaging/README.rst b/tests/packaging/README.rst
new file mode 100644
index 0000000..5033b49
--- /dev/null
+++ b/tests/packaging/README.rst
@@ -0,0 +1,87 @@
+.. SPDX-License-Identifier: GPL-3.0-or-later
+
+Packaging tests
+===============
+
+Packaging tests used pytest, docker and each directory with subdirectory *.packaging*
+is called as *component*.
+
+Run tests for all components:
+
+.. code-block::
+
+ pytest -r fEsxX tests/packaging
+
+List all components:
+
+.. code-block::
+
+ pytest tests/packaging --collect-only
+
+Run test for specific component (*doc/.packaging*):
+
+.. code-block::
+
+ pytest -r fEsxX tests/packaging -k test_collect[debian_10-doc/.packaging]
+
+.. note::
+
+ For debug add argument :code:`-s`.
+
+daemon/.packaging component
+---------------------------
+
+This is special component that is used by all others components.
+For each distribution and version are created two docker images with this component.
+One with building dependencies and one for running dependencies.
+*Build docker image* is tagged as :code:`kr-packaging-tests-<distro><version>-build`
+and *Run docker image* is tagged as :code:`kr-packaging-tests-<distro><version>-run`.
+
+Others components
+-----------------
+
+All others components are based on *daemon/.packaging* component (docker image).
+When component needs new building dependencies, new running dependencies
+or some scripts that change build or run phase (see `File structure of each component`_),
+new docker image is created.
+*Build docker image* is tagged as :code:`kr-packaging-tests-<distro><version>-<component>-build`
+and *Run docker image* is tagged as :code:`kr-packaging-tests-<distro><version>-<component>-run`.
+
+File structure of each component
+------------------------------------
+
+* <distro>
+ * <version>
+ * builddeps - list of build depedencies
+ * rundeps - list of runtime depedencies
+ * pre-build.sh - script called before build phase
+ * post-build.sh - script called after build phase
+ * pre-run.sh - script called before run phase
+ * post-run.sh - script called after run phase
+ * install.sh and build.sh - scripts to rewrite standard commands for building and instaling knot-resolvers
+ * pre-test.sh - script called immediately before testing
+* test.config or test.sh - kresd config test or shell script (one of them must exists)
+
+Commands order to create docker image
+-------------------------------------
+
+For *build docker image*:
+
+#. run pre-build.sh
+#. install packages specifed in the file *builddeps*
+#. run build.sh
+#. run install.sh
+#. run post-build.sh
+
+For *run docker image*:
+
+#. run pre-run.sh
+#. install packages specifed in the file *rundeps*
+#. run pre-test.sh
+#. run test (:code:`kresd -c test.config` or :code:`test.sh`)
+#. run post-build.sh
+
+
+.. note::
+
+ knot-resolver builded in *build docker image* is automatically moved to *run docker image*.