diff options
Diffstat (limited to 'documentation/test-manual/reproducible-builds.rst')
-rw-r--r-- | documentation/test-manual/reproducible-builds.rst | 60 |
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 | ||
94 | This defaults to including a ``world`` build so, if other layers are added, it would | 94 | This defaults to including a ``world`` build so, if other layers are added, it |
95 | also run the tests for recipes in the additional layers. Different build targets | 95 | would also run the tests for recipes in the additional layers. Different build |
96 | can be defined using the :term:`OEQA_REPRODUCIBLE_TEST_TARGET` variable in ``local.conf``. | 96 | targets can be defined using the :term:`OEQA_REPRODUCIBLE_TEST_TARGET` variable |
97 | The first build will be run using :ref:`Shared State <overview-manual/concepts:Shared State>` if | 97 | in ``local.conf``. For example, running reproducibility tests for only the |
98 | available, 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 | |
100 | the :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS` variable, and builds on the | 100 | OEQA_REPRODUCIBLE_TEST_TARGET = "python3-numpy" |
101 | |||
102 | in local.conf before running the ``oe-selftest`` command shown above. | ||
103 | |||
104 | Reproducibility builds the target list twice. The first build will be run using | ||
105 | :ref:`Shared State <overview-manual/concepts:Shared State>` if available, the | ||
106 | second 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 | ||
101 | specific host the build is running on. This means we can test reproducibility | 109 | specific host the build is running on. This means we can test reproducibility |
102 | builds between different host distributions over time on the Autobuilder. | 110 | builds 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 + | |||
111 | The project's current reproducibility status can be seen at | 119 | The project's current reproducibility status can be seen at |
112 | :yocto_home:`/reproducible-build-results/` | 120 | :yocto_home:`/reproducible-build-results/` |
113 | 121 | ||
114 | You can also check the reproducibility status on supported host distributions: | 122 | You 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` | 126 | How 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 | =============================== | 129 | With world build |
122 | Can I test my layer or recipes? | 130 | ~~~~~~~~~~~~~~~~ |
123 | =============================== | ||
124 | 131 | ||
125 | Once again, you can run a ``world`` test using the | 132 | Once 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 | |||
128 | in :oe_git:`meta/lib/oeqa/selftest/cases/reproducible.py | 135 | in :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 | ||
138 | Subclassing the test | ||
139 | ~~~~~~~~~~~~~~~~~~~~ | ||
140 | |||
131 | You could subclass the test and change ``targets`` to a different target. | 141 | You could subclass the test and change ``targets`` to a different target. |
132 | 142 | ||
133 | You may also change ``sstate_targets`` which would allow you to "pre-cache" some | 143 | You 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 | |||
135 | testing. As a practical example, you could set ``sstate_targets`` to | 145 | testing. 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 |
137 | run reproducibility tests only on the targets belonging only to ``core-image-sato-sdk``. | 147 | run reproducibility tests only on the targets belonging only to ``core-image-sato-sdk``. |
148 | |||
149 | Using :term:`OEQA_REPRODUCIBLE_TEST_* <OEQA_REPRODUCIBLE_TEST_LEAF_TARGETS>` variables | ||
150 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
151 | |||
152 | If 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 | |||
157 | This will test the reproducibility of ``my-recipe`` but will use the | ||
158 | :ref:`Shared State <overview-manual/concepts:Shared State>` for most its | ||
159 | dependencies (i.e. the ones explicitly listed in DEPENDS, which may not be all | ||
160 | dependencies, c.f. [depends] varflags, PACKAGE_DEPENDS and other | ||
161 | implementations). | ||
162 | |||
163 | You 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>`. | ||