Message ID | 20230613081451.1736892-1-mikko.rapeli@linaro.org |
---|---|
State | New |
Headers | show |
Series | selftest reproducible.py: support different build targets | expand |
There should be a default, set to what it is now. Alex On Tue 13. Jun 2023 at 10.15, Mikko Rapeli <mikko.rapeli@linaro.org> wrote: > From: Mikko Rapeli <mikko.rapeli@linaro.org> > > Allow users to set different build reproducibility targets than > the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and > OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. > > Fixing all issues from "world" builds is not possible in some > complex build environments with lots of layers. Limiting the focus to > a smaller subset allows using this test to detect and fix build > reproduction issues incrementally. > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta/lib/oeqa/selftest/cases/reproducible.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py > b/meta/lib/oeqa/selftest/cases/reproducible.py > index cd7aa8aafa..5c588461fa 100644 > --- a/meta/lib/oeqa/selftest/cases/reproducible.py > +++ b/meta/lib/oeqa/selftest/cases/reproducible.py > @@ -134,9 +134,13 @@ class ReproducibleTests(OESelftestTestCase): > max_report_size = 250 * 1024 * 1024 > > # targets are the things we want to test the reproducibility of > - targets = ['core-image-minimal', 'core-image-sato', > 'core-image-full-cmdline', 'core-image-weston', 'world'] > + targets = get_bb_var("OEQA_REPRODUCIBLE_TEST_TARGET") > + if targets: > + targets = targets.split() > + else: > + targets = ['core-image-minimal', 'core-image-sato', > 'core-image-full-cmdline', 'core-image-weston', 'world'] > # sstate targets are things to pull from sstate to potentially cut > build/debugging time > - sstate_targets = [] > + sstate_targets = (get_bb_var("OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS") > or "").split() > save_results = False > if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: > save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182696): > https://lists.openembedded.org/g/openembedded-core/message/182696 > Mute This Topic: https://lists.openembedded.org/mt/99501089/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
On second thought maybe not. Not sure about it :) Alex On Tue 13. Jun 2023 at 10.50, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote: > There should be a default, set to what it is now. > > Alex > > > On Tue 13. Jun 2023 at 10.15, Mikko Rapeli <mikko.rapeli@linaro.org> > wrote: > >> From: Mikko Rapeli <mikko.rapeli@linaro.org> >> >> Allow users to set different build reproducibility targets than >> the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and >> OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. >> >> Fixing all issues from "world" builds is not possible in some >> complex build environments with lots of layers. Limiting the focus to >> a smaller subset allows using this test to detect and fix build >> reproduction issues incrementally. >> >> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> >> --- >> meta/lib/oeqa/selftest/cases/reproducible.py | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py >> b/meta/lib/oeqa/selftest/cases/reproducible.py >> index cd7aa8aafa..5c588461fa 100644 >> --- a/meta/lib/oeqa/selftest/cases/reproducible.py >> +++ b/meta/lib/oeqa/selftest/cases/reproducible.py >> @@ -134,9 +134,13 @@ class ReproducibleTests(OESelftestTestCase): >> max_report_size = 250 * 1024 * 1024 >> >> # targets are the things we want to test the reproducibility of >> - targets = ['core-image-minimal', 'core-image-sato', >> 'core-image-full-cmdline', 'core-image-weston', 'world'] >> + targets = get_bb_var("OEQA_REPRODUCIBLE_TEST_TARGET") >> + if targets: >> + targets = targets.split() >> + else: >> + targets = ['core-image-minimal', 'core-image-sato', >> 'core-image-full-cmdline', 'core-image-weston', 'world'] >> # sstate targets are things to pull from sstate to potentially cut >> build/debugging time >> - sstate_targets = [] >> + sstate_targets = >> (get_bb_var("OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS") or "").split() >> save_results = False >> if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: >> save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT'] >> -- >> 2.34.1 >> >> >> >> >> > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182697): > https://lists.openembedded.org/g/openembedded-core/message/182697 > Mute This Topic: https://lists.openembedded.org/mt/99501089/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
Hi Alex, On Tue, Jun 13, 2023 at 10:50:20AM +0200, Alexander Kanavin wrote: > There should be a default, set to what it is now. > > On Tue 13. Jun 2023 at 10.15, Mikko Rapeli <mikko.rapeli@linaro.org> wrote: > > > From: Mikko Rapeli <mikko.rapeli@linaro.org> > > > > Allow users to set different build reproducibility targets than > > the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and > > OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. If OEQA_REPRODUCIBLE_TEST_TARGET or OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS are not set, the current defaults are still there hard coded into the test. Cheers, -Mikko
Hi Mikko, Mikko Rapeli <mikko.rapeli@linaro.org> escreveu no dia terça, 13/06/2023 à(s) 09:57: > Hi Alex, > > On Tue, Jun 13, 2023 at 10:50:20AM +0200, Alexander Kanavin wrote: > > There should be a default, set to what it is now. > > > > On Tue 13. Jun 2023 at 10.15, Mikko Rapeli <mikko.rapeli@linaro.org> > wrote: > > > > > From: Mikko Rapeli <mikko.rapeli@linaro.org> > > > > > > Allow users to set different build reproducibility targets than > > > the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and > > > OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. > > If OEQA_REPRODUCIBLE_TEST_TARGET or OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS > are not set, the current defaults are still there hard coded into > the test. > Looks like a good improvement and with this new variable we can run the test without needing to subclass the ReproducibleTests class to change the target image and the state target. I have a subclass just to change these two items. Jose > > Cheers, > > -Mikko > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182699): > https://lists.openembedded.org/g/openembedded-core/message/182699 > Mute This Topic: https://lists.openembedded.org/mt/99501089/5052612 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > quaresma.jose@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index cd7aa8aafa..5c588461fa 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py @@ -134,9 +134,13 @@ class ReproducibleTests(OESelftestTestCase): max_report_size = 250 * 1024 * 1024 # targets are the things we want to test the reproducibility of - targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world'] + targets = get_bb_var("OEQA_REPRODUCIBLE_TEST_TARGET") + if targets: + targets = targets.split() + else: + targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world'] # sstate targets are things to pull from sstate to potentially cut build/debugging time - sstate_targets = [] + sstate_targets = (get_bb_var("OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS") or "").split() save_results = False if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ: save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT']