* [PATCH 0/2] fix for oeqa/core/loader.py and image_types.bbclass @ 2017-12-21 2:02 Robert Yang 2017-12-21 2:02 ` [PATCH 1/2] oeqa/core/loader.py: fix re for module Robert Yang 2017-12-21 2:02 ` [PATCH 2/2] image_types.bbclass: use stat to get sparse file's size Robert Yang 0 siblings, 2 replies; 4+ messages in thread From: Robert Yang @ 2017-12-21 2:02 UTC (permalink / raw) To: openembedded-core The following changes since commit 978472c58629d1448399207873bbead96b27102e: image.bbclass: Add additional bb.debug to help track 12304 (2017-12-18 18:02:12 +0000) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib rbt/2fixes http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/2fixes Robert Yang (2): oeqa/core/loader.py: fix re for module image_types.bbclass: use stat to get sparse file's size meta/classes/image_types.bbclass | 2 +- meta/lib/oeqa/core/loader.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] oeqa/core/loader.py: fix re for module 2017-12-21 2:02 [PATCH 0/2] fix for oeqa/core/loader.py and image_types.bbclass Robert Yang @ 2017-12-21 2:02 ` Robert Yang 2017-12-26 2:37 ` Robert Yang 2017-12-21 2:02 ` [PATCH 2/2] image_types.bbclass: use stat to get sparse file's size Robert Yang 1 sibling, 1 reply; 4+ messages in thread From: Robert Yang @ 2017-12-21 2:02 UTC (permalink / raw) To: openembedded-core Fixed: $ oe-selftest -r eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds Traceback (most recent call last): [snip] File "/workspace2/lyang1/poky/meta/lib/oeqa/core/loader.py", line 49, in _built_modules_dict module_name, class_name, test_name = m.groups() AttributeError: 'NoneType' object has no attribute 'groups' The old code assumed the arg should be: module.Class.test Note about the module and Class, the lower and upper cases matters, which can't handle the testcases like eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds and gotoolchain.oeGoToolchainSelfTest.test_go_dep_build. Use a new re to fix the problem, now all of the following commmands can work: $ oe-selftest -r eSDK $ oe-selftest -r eSDK.oeSDKExtSelfTest $ oe-selftest -r eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds [YOCTO #12438] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/lib/oeqa/core/loader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py index 975a081..25078ba 100644 --- a/meta/lib/oeqa/core/loader.py +++ b/meta/lib/oeqa/core/loader.py @@ -41,9 +41,10 @@ def _built_modules_dict(modules): return modules_dict for module in modules: - # Assumption: package and module names do not contain upper case - # characters, whereas class names do - m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module) + # The format is module.class.test, while .class and .test is optional. + m = re.match(r'([^\.]+)(?:\.([^\.]+))?(?:\.([^\.]*))?', module) + if not m: + raise OEQATestNotFound("Not found %s in loaded test cases" % module) module_name, class_name, test_name = m.groups() -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] oeqa/core/loader.py: fix re for module 2017-12-21 2:02 ` [PATCH 1/2] oeqa/core/loader.py: fix re for module Robert Yang @ 2017-12-26 2:37 ` Robert Yang 0 siblings, 0 replies; 4+ messages in thread From: Robert Yang @ 2017-12-26 2:37 UTC (permalink / raw) To: openembedded-core Please drop patch 1/2 since Leo has sent patch for it: core/loader.py: fix regex to include all available test cases // Robert On 12/21/2017 10:02 AM, Robert Yang wrote: > Fixed: > $ oe-selftest -r eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds > Traceback (most recent call last): > [snip] > File "/workspace2/lyang1/poky/meta/lib/oeqa/core/loader.py", line 49, in _built_modules_dict > module_name, class_name, test_name = m.groups() > AttributeError: 'NoneType' object has no attribute 'groups' > > The old code assumed the arg should be: > module.Class.test > > Note about the module and Class, the lower and upper cases matters, which can't > handle the testcases like eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds > and gotoolchain.oeGoToolchainSelfTest.test_go_dep_build. Use a new re to fix > the problem, now all of the following commmands can work: > $ oe-selftest -r eSDK > $ oe-selftest -r eSDK.oeSDKExtSelfTest > $ oe-selftest -r eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds > > [YOCTO #12438] > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > meta/lib/oeqa/core/loader.py | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py > index 975a081..25078ba 100644 > --- a/meta/lib/oeqa/core/loader.py > +++ b/meta/lib/oeqa/core/loader.py > @@ -41,9 +41,10 @@ def _built_modules_dict(modules): > return modules_dict > > for module in modules: > - # Assumption: package and module names do not contain upper case > - # characters, whereas class names do > - m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module) > + # The format is module.class.test, while .class and .test is optional. > + m = re.match(r'([^\.]+)(?:\.([^\.]+))?(?:\.([^\.]*))?', module) > + if not m: > + raise OEQATestNotFound("Not found %s in loaded test cases" % module) > > module_name, class_name, test_name = m.groups() > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] image_types.bbclass: use stat to get sparse file's size 2017-12-21 2:02 [PATCH 0/2] fix for oeqa/core/loader.py and image_types.bbclass Robert Yang 2017-12-21 2:02 ` [PATCH 1/2] oeqa/core/loader.py: fix re for module Robert Yang @ 2017-12-21 2:02 ` Robert Yang 1 sibling, 0 replies; 4+ messages in thread From: Robert Yang @ 2017-12-21 2:02 UTC (permalink / raw) To: openembedded-core The "ls -s sparse_file"'s result is 0, use stat to replace of it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/classes/image_types.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index e881d0c..4a96f61 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -86,7 +86,7 @@ oe_mkext234fs () { bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024" dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024 bbdebug 1 "Actual Rootfs size: `du -s ${IMAGE_ROOTFS}`" - bbdebug 1 "Actual Partion size: `ls -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`" + bbdebug 1 "Actual Partion size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`" bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}" mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS} # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-26 2:37 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-12-21 2:02 [PATCH 0/2] fix for oeqa/core/loader.py and image_types.bbclass Robert Yang 2017-12-21 2:02 ` [PATCH 1/2] oeqa/core/loader.py: fix re for module Robert Yang 2017-12-26 2:37 ` Robert Yang 2017-12-21 2:02 ` [PATCH 2/2] image_types.bbclass: use stat to get sparse file's size Robert Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox