* [RFC PATCH 0/1] Split do_package_qa in insane.bbclass to be a new task @ 2013-03-11 3:31 Kang Kai 2013-03-11 3:31 ` [PATCH 1/1] insane.bbclass: make do_package_qa be a task Kang Kai 0 siblings, 1 reply; 4+ messages in thread From: Kang Kai @ 2013-03-11 3:31 UTC (permalink / raw) To: richard.purdie; +Cc: openembedded-core Hi Richard, This patch is try to accomplish Yocto #3190, and you said: " The sanity tests in insane.bbclass need refactoring to make it easier to extend. In particular, some packaging tests are currently ending up in package.bbclass. These should be in insane.bbclass with hooks added as appropriate. Further, all tests should honour the settings of QA_WARN and QA_ERROR. " do_package_qa is splitted as a new task run after do_package. Then 'inherit package' could be removed from insane.bbclass, and do_package_qa doesn't end in package.bbclass. I know this patch is not enough for this feature, but I want to make sure this is the right direction and hope to receive more guidance. Would you like to give more guidance? Thanks a lot. Regards, Kai The following changes since commit 93ec7b4d1550e07caec86e2998d0f94a01c7e785: xserver-xf86-config: atom-pc doesn't need a xorg.conf (2013-03-04 14:42:11 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib kangkai/insane http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/insane Kang Kai (1): insane.bbclass: make do_package_qa be a task meta/classes/insane.bbclass | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) -- 1.7.5.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] insane.bbclass: make do_package_qa be a task 2013-03-11 3:31 [RFC PATCH 0/1] Split do_package_qa in insane.bbclass to be a new task Kang Kai @ 2013-03-11 3:31 ` Kang Kai 2013-03-11 8:06 ` Bernhard Reutner-Fischer 0 siblings, 1 reply; 4+ messages in thread From: Kang Kai @ 2013-03-11 3:31 UTC (permalink / raw) To: richard.purdie; +Cc: openembedded-core do_package_qa is added to variable PACKAGEFUNCS and run after do_package. packaging tests should not ending up in package.bbclass. Split do_package_qa as a new task after do_package. [YOCTO #3190] Signed-off-by: Kang Kai <kai.kang@windriver.com> --- meta/classes/insane.bbclass | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index bd6f120..d7787ac 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -17,9 +17,9 @@ # files under exec_prefix -inherit package +#inherit package PACKAGE_DEPENDS += "${QADEPENDS}" -PACKAGEFUNCS += " do_package_qa " +#PACKAGEFUNCS += " do_package_qa " # unsafe-references-in-binaries requires prelink-rtld from # prelink-native, but we don't want this DEPENDS for -native builds @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d): target_os = d.getVar('TARGET_OS', True) target_arch = d.getVar('TARGET_ARCH', True) + pkgfiles = {} + packages = d.getVar('PACKAGES', True).split() + pkgdest = d.getVar('PKGDEST', True) + for pkg in packages: + pkgfiles[pkg] = [] + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): + for file in files: + pkgfiles[pkg].append(walkroot + os.sep + file) + warnings = [] errors = [] for path in pkgfiles[package]: @@ -823,6 +832,8 @@ python do_package_qa () { bb.note("DONE with PACKAGE QA") } +addtask package_qa after do_package before do_build +EXPORT_FUNCTIONS do_package_qa python do_qa_staging() { bb.note("QA checking staging") -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] insane.bbclass: make do_package_qa be a task 2013-03-11 3:31 ` [PATCH 1/1] insane.bbclass: make do_package_qa be a task Kang Kai @ 2013-03-11 8:06 ` Bernhard Reutner-Fischer 2013-03-11 8:24 ` Kang Kai 0 siblings, 1 reply; 4+ messages in thread From: Bernhard Reutner-Fischer @ 2013-03-11 8:06 UTC (permalink / raw) To: Kang Kai, richard.purdie; +Cc: openembedded-core On 11 March 2013 04:31:17 Kang Kai <kai.kang@windriver.com> wrote: > do_package_qa is added to variable PACKAGEFUNCS and run after > do_package. packaging tests should not ending up in package.bbclass. > Split do_package_qa as a new task after do_package. > > [YOCTO #3190] > > Signed-off-by: Kang Kai <kai.kang@windriver.com> > --- > meta/classes/insane.bbclass | 15 +++++++++++++-- > 1 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index bd6f120..d7787ac 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -17,9 +17,9 @@ > # files under exec_prefix > > > -inherit package > +#inherit package > PACKAGE_DEPENDS += "${QADEPENDS}" > -PACKAGEFUNCS += " do_package_qa " > +#PACKAGEFUNCS += " do_package_qa " I'd remove those lines, they are in the history anyway. > > # unsafe-references-in-binaries requires prelink-rtld from > # prelink-native, but we don't want this DEPENDS for -native builds > @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, > skip, package, d): > target_os = d.getVar('TARGET_OS', True) > target_arch = d.getVar('TARGET_ARCH', True) > > + pkgfiles = {} > + packages = d.getVar('PACKAGES', True).split() > + pkgdest = d.getVar('PKGDEST', True) > + for pkg in packages: > + pkgfiles[pkg] = [] > + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): I'd use os.sep above, too. I would ACK the patch with these changes, fwiw. Thanks, > + for file in files: > + pkgfiles[pkg].append(walkroot + os.sep + file) > + > warnings = [] > errors = [] > for path in pkgfiles[package]: > @@ -823,6 +832,8 @@ python do_package_qa () { > bb.note("DONE with PACKAGE QA") > } > > +addtask package_qa after do_package before do_build > +EXPORT_FUNCTIONS do_package_qa > > python do_qa_staging() { > bb.note("QA checking staging") > -- > 1.7.5.4 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core Sent with AquaMail for Android http://www.aqua-mail.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] insane.bbclass: make do_package_qa be a task 2013-03-11 8:06 ` Bernhard Reutner-Fischer @ 2013-03-11 8:24 ` Kang Kai 0 siblings, 0 replies; 4+ messages in thread From: Kang Kai @ 2013-03-11 8:24 UTC (permalink / raw) To: Bernhard Reutner-Fischer; +Cc: openembedded-core On 2013年03月11日 16:06, Bernhard Reutner-Fischer wrote: > On 11 March 2013 04:31:17 Kang Kai <kai.kang@windriver.com> wrote: >> do_package_qa is added to variable PACKAGEFUNCS and run after >> do_package. packaging tests should not ending up in package.bbclass. >> Split do_package_qa as a new task after do_package. >> >> [YOCTO #3190] >> >> Signed-off-by: Kang Kai <kai.kang@windriver.com> >> --- >> meta/classes/insane.bbclass | 15 +++++++++++++-- >> 1 files changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass >> index bd6f120..d7787ac 100644 >> --- a/meta/classes/insane.bbclass >> +++ b/meta/classes/insane.bbclass >> @@ -17,9 +17,9 @@ >> # files under exec_prefix >> >> >> -inherit package >> +#inherit package >> PACKAGE_DEPENDS += "${QADEPENDS}" >> -PACKAGEFUNCS += " do_package_qa " >> +#PACKAGEFUNCS += " do_package_qa " > > I'd remove those lines, they are in the history anyway. > >> >> # unsafe-references-in-binaries requires prelink-rtld from >> # prelink-native, but we don't want this DEPENDS for -native builds >> @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, >> skip, package, d): >> target_os = d.getVar('TARGET_OS', True) >> target_arch = d.getVar('TARGET_ARCH', True) >> >> + pkgfiles = {} >> + packages = d.getVar('PACKAGES', True).split() >> + pkgdest = d.getVar('PKGDEST', True) >> + for pkg in packages: >> + pkgfiles[pkg] = [] >> + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): > Hi Bernhard, > I'd use os.sep above, too. > I would ACK the patch with these changes, fwiw. Thanks for your review, and I will update patch. Regards, Kai > Thanks, >> + for file in files: >> + pkgfiles[pkg].append(walkroot + os.sep + file) >> + >> warnings = [] >> errors = [] >> for path in pkgfiles[package]: >> @@ -823,6 +832,8 @@ python do_package_qa () { >> bb.note("DONE with PACKAGE QA") >> } >> >> +addtask package_qa after do_package before do_build >> +EXPORT_FUNCTIONS do_package_qa >> >> python do_qa_staging() { >> bb.note("QA checking staging") >> -- >> 1.7.5.4 >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > Sent with AquaMail for Android > http://www.aqua-mail.com > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-11 8:39 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-11 3:31 [RFC PATCH 0/1] Split do_package_qa in insane.bbclass to be a new task Kang Kai 2013-03-11 3:31 ` [PATCH 1/1] insane.bbclass: make do_package_qa be a task Kang Kai 2013-03-11 8:06 ` Bernhard Reutner-Fischer 2013-03-11 8:24 ` Kang Kai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox