summaryrefslogtreecommitdiffstats
path: root/documentation/test-manual/reproducible-builds.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/test-manual/reproducible-builds.rst')
-rw-r--r--documentation/test-manual/reproducible-builds.rst60
1 files changed, 45 insertions, 15 deletions
diff --git a/documentation/test-manual/reproducible-builds.rst b/documentation/test-manual/reproducible-builds.rst
index 91f94a5c74..b913aa4eaf 100644
--- a/documentation/test-manual/reproducible-builds.rst
+++ b/documentation/test-manual/reproducible-builds.rst
@@ -91,13 +91,21 @@ run::
91 91
92 oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds 92 oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
93 93
94This defaults to including a ``world`` build so, if other layers are added, it would 94This defaults to including a ``world`` build so, if other layers are added, it
95also run the tests for recipes in the additional layers. Different build targets 95would also run the tests for recipes in the additional layers. Different build
96can be defined using the :term:`OEQA_REPRODUCIBLE_TEST_TARGET` variable in ``local.conf``. 96targets can be defined using the :term:`OEQA_REPRODUCIBLE_TEST_TARGET` variable
97The first build will be run using :ref:`Shared State <overview-manual/concepts:Shared State>` if 97in ``local.conf``. For example, running reproducibility tests for only the
98available, the second build explicitly disables 98``python3-numpy`` recipe can be done by setting::
99:ref:`Shared State <overview-manual/concepts:Shared State>` except for recipes defined in 99
100the :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS` variable, and builds on the 100 OEQA_REPRODUCIBLE_TEST_TARGET = "python3-numpy"
101
102in local.conf before running the ``oe-selftest`` command shown above.
103
104Reproducibility builds the target list twice. The first build will be run using
105:ref:`Shared State <overview-manual/concepts:Shared State>` if available, the
106second build explicitly disables :ref:`Shared State
107<overview-manual/concepts:Shared State>` except for recipes defined in the
108:term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS` variable, and builds on the
101specific host the build is running on. This means we can test reproducibility 109specific host the build is running on. This means we can test reproducibility
102builds between different host distributions over time on the Autobuilder. 110builds between different host distributions over time on the Autobuilder.
103 111
@@ -111,16 +119,15 @@ https://autobuilder.yocto.io/pub/repro-fail/ in the form ``oe-reproducible +
111The project's current reproducibility status can be seen at 119The project's current reproducibility status can be seen at
112:yocto_home:`/reproducible-build-results/` 120:yocto_home:`/reproducible-build-results/`
113 121
114You can also check the reproducibility status on supported host distributions: 122You can also check the reproducibility status on the Autobuilder:
123:yocto_ab:`/valkyrie/#/builders/reproducible`.
115 124
116- CentOS: :yocto_ab:`/typhoon/#/builders/reproducible-centos` 125===================================
117- Debian: :yocto_ab:`/typhoon/#/builders/reproducible-debian` 126How can I test my layer or recipes?
118- Fedora: :yocto_ab:`/typhoon/#/builders/reproducible-fedora` 127===================================
119- Ubuntu: :yocto_ab:`/typhoon/#/builders/reproducible-ubuntu`
120 128
121=============================== 129With world build
122Can I test my layer or recipes? 130~~~~~~~~~~~~~~~~
123===============================
124 131
125Once again, you can run a ``world`` test using the 132Once again, you can run a ``world`` test using the
126:ref:`oe-selftest <ref-manual/release-process:Testing and Quality Assurance>` 133:ref:`oe-selftest <ref-manual/release-process:Testing and Quality Assurance>`
@@ -128,6 +135,9 @@ command provided above. This functionality is implemented
128in :oe_git:`meta/lib/oeqa/selftest/cases/reproducible.py 135in :oe_git:`meta/lib/oeqa/selftest/cases/reproducible.py
129</openembedded-core/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`. 136</openembedded-core/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`.
130 137
138Subclassing the test
139~~~~~~~~~~~~~~~~~~~~
140
131You could subclass the test and change ``targets`` to a different target. 141You could subclass the test and change ``targets`` to a different target.
132 142
133You may also change ``sstate_targets`` which would allow you to "pre-cache" some 143You may also change ``sstate_targets`` which would allow you to "pre-cache" some
@@ -135,3 +145,23 @@ set of recipes before the test, meaning they are excluded from reproducibility
135testing. As a practical example, you could set ``sstate_targets`` to 145testing. As a practical example, you could set ``sstate_targets`` to
136``core-image-sato``, then setting ``targets`` to ``core-image-sato-sdk`` would 146``core-image-sato``, then setting ``targets`` to ``core-image-sato-sdk`` would
137run reproducibility tests only on the targets belonging only to ``core-image-sato-sdk``. 147run reproducibility tests only on the targets belonging only to ``core-image-sato-sdk``.
148
149Using :term:`OEQA_REPRODUCIBLE_TEST_* <OEQA_REPRODUCIBLE_TEST_LEAF_TARGETS>` variables
150~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151
152If you want to test the reproducibility of a set of recipes, you can define
153:term:`OEQA_REPRODUCIBLE_TEST_LEAF_TARGETS`, in your local.conf::
154
155 OEQA_REPRODUCIBLE_TEST_LEAF_TARGETS = "my-recipe"
156
157This will test the reproducibility of ``my-recipe`` but will use the
158:ref:`Shared State <overview-manual/concepts:Shared State>` for most its
159dependencies (i.e. the ones explicitly listed in DEPENDS, which may not be all
160dependencies, c.f. [depends] varflags, PACKAGE_DEPENDS and other
161implementations).
162
163You can have finer control on the test with:
164
165- :term:`OEQA_REPRODUCIBLE_TEST_TARGET`: lists recipes to be built,
166- :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS`: lists recipes that will
167 be built using :ref:`Shared State <overview-manual/concepts:Shared State>`.