Message ID | 20240118102409.2680941-1-alex@linutronix.de |
---|---|
State | New |
Headers | show |
Series | [1/4] oeqa/runtime/rpm: raise exception if test rpm file cannot be found | expand |
Hello, This fails pkgman-non-rpm: https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/8412 On 18/01/2024 11:24:06+0100, Alexander Kanavin wrote: > The tests rely on that, and so the discovery shouldn't simply > fall through. > > Signed-off-by: Alexander Kanavin <alex@linutronix.de> > --- > meta/lib/oeqa/runtime/cases/rpm.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py > index a4ba4e67698..bd9050a81b2 100644 > --- a/meta/lib/oeqa/runtime/cases/rpm.py > +++ b/meta/lib/oeqa/runtime/cases/rpm.py > @@ -88,9 +88,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase): > # and it will always be built for standard targets > rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch > if not os.path.exists(rpmdir): > - return > + raise Exception("Rpm directory {} does not exist".format(cls.tc.td['DEPLOY_DIR'])) > for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc): > cls.test_file = os.path.join(rpmdir, f) > + break > + else: > + raise Exception("Couldn't find the test rpm file {} in {}".format(rpm_doc, rpmdir)) > cls.dst = '/tmp/base-passwd-doc.rpm' > > @OETestDepends(['rpm.RpmBasicTest.test_rpm_query']) > -- > 2.39.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#193969): https://lists.openembedded.org/g/openembedded-core/message/193969 > Mute This Topic: https://lists.openembedded.org/mt/103805481/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py index a4ba4e67698..bd9050a81b2 100644 --- a/meta/lib/oeqa/runtime/cases/rpm.py +++ b/meta/lib/oeqa/runtime/cases/rpm.py @@ -88,9 +88,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase): # and it will always be built for standard targets rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch if not os.path.exists(rpmdir): - return + raise Exception("Rpm directory {} does not exist".format(cls.tc.td['DEPLOY_DIR'])) for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc): cls.test_file = os.path.join(rpmdir, f) + break + else: + raise Exception("Couldn't find the test rpm file {} in {}".format(rpm_doc, rpmdir)) cls.dst = '/tmp/base-passwd-doc.rpm' @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
The tests rely on that, and so the discovery shouldn't simply fall through. Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- meta/lib/oeqa/runtime/cases/rpm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)