All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: Patrick Ohly <patrick.ohly@intel.com>
Cc: joshua.g.lock@intel.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 20/30] oeqa/selftest/cases: runqemu enable thraded runs
Date: Wed, 12 Jul 2017 10:01:44 -0500	[thread overview]
Message-ID: <ec785117-31c8-db37-cfbe-b7bd34ce007f@linux.intel.com> (raw)
In-Reply-To: <1499843714.20211.117.camel@intel.com>



On 07/12/2017 02:15 AM, Patrick Ohly wrote:
> s/thraded/threaded/ in the subject. There are more spelling mistakes
> elsewhere ("wrapper methos"). I don't know how important that is.
> 
> On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote:
>> - Update to use wrappers {bitbake,get_bb_var} from OESelfTestCase class.
> 
> s/OESelfTestCase/OESelftestTestCase/
> 
> Sorry to be pedantic, but I wanted to look up what these wrappers do and
> couldn't even find the class ;-}

Yes np,

> 
> I've found them in the "oeqa/selftest/case: Add wrappers to
> utils.commands modules" patch. I'm a bit worried that this entire patch
> series is introducing concepts and methods without any documentation or
> explanations why things are done this way. I suspect it will make it
> very hard to write selftests correctly.
> 
> For example, this patch and others like it seem fairly arbitrary. It
> doesn't explain why self.bitbake() is better than bitbake(). If in some
> future patch or test someone were to use bitbake() when they should have
> used self.bitbake() it's not going to be obvious either whether that is
> correct.
> 
> Perhaps all OE tests should have these wrappers and only
> OESelftestTestCase does something special with them? Then we can
> gradually replace the direct calls to oeqa.utils.commands completely.

You are right, the reason for add the wrappers is to be able to run
bitbake, runCmd, get_bb_var{,s}, in certain build directory.


For compatibility reasons the base class OESelftestTestCase is set to
use the main thread and the original builddir, and that's the reason to
don't delete the oeqa.utils.commands.

I guess the best way to address this is to include a README explaining
this situation into the meta/lib/oeqa/selftest folder.

> 
> Add also a wrapper for runqemu and we can get rid of "from
> oeqa.utils.commands import" completely.

Yes we can after the refkit and other selftest are adapted.


Cheers,
Anibal

> 
>> - Run into the main thread because it needs tinfoil to run.
>>
>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
>> ---
>>  meta/lib/oeqa/selftest/cases/runqemu.py | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
>> index 4050a4123ba..e30cb24046f 100644
>> --- a/meta/lib/oeqa/selftest/cases/runqemu.py
>> +++ b/meta/lib/oeqa/selftest/cases/runqemu.py
>> @@ -6,12 +6,11 @@ import re
>>  import logging
>>  
>>  from oeqa.selftest.case import OESelftestTestCase
>> -from oeqa.utils.commands import bitbake, runqemu, get_bb_var
>> +from oeqa.utils.commands import runqemu
>>  from oeqa.core.decorator.oeid import OETestID
>>  
>>  class RunqemuTests(OESelftestTestCase):
>>      """Runqemu test class"""
>> -
>>      image_is_ready = False
>>      deploy_dir_image = ''
>>  
>> @@ -37,8 +36,8 @@ SYSLINUX_TIMEOUT = "10"
>>          )
>>  
>>          if not RunqemuTests.image_is_ready:
>> -            RunqemuTests.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
>> -            bitbake(self.recipe)
>> +            RunqemuTests.deploy_dir_image = self.get_bb_var('DEPLOY_DIR_IMAGE')
>> +            self.bitbake(self.recipe)
>>              RunqemuTests.image_is_ready = True
>>  
>>      @OETestID(2001)
> 


  reply	other threads:[~2017-07-12 15:01 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 20:23 [PATCH 00/30] oeqa core and oe-selftest threaded enablement Aníbal Limón
2017-07-11 20:23 ` [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test Aníbal Limón
2017-07-14  9:52   ` Patrick Ohly
2017-07-14 15:27     ` Aníbal Limón
2017-07-17 19:14       ` Patrick Ohly
2017-07-17 19:41         ` Aníbal Limón
2017-07-17 20:03           ` Patrick Ohly
2017-07-11 20:23 ` [PATCH 02/30] oeqa/selftest/{context, case}: Handle KeyboardInterrupt/SIGINT and SIGTERM Aníbal Limón
2017-07-12 14:18   ` Leonardo Sandoval
2017-07-12 14:53     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 03/30] selftest/cases/package: Call parent setUpClass method Aníbal Limón
2017-07-12  6:51   ` Patrick Ohly
2017-07-12 15:44     ` Aníbal Limón
2017-07-12 17:14       ` Patrick Ohly
2017-07-11 20:23 ` [PATCH 04/30] bb/tinfoil: run_command handle busy status in bitbake server Aníbal Limón
2017-07-11 20:23 ` [PATCH 05/30] oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from env Aníbal Limón
2017-07-11 20:23 ` [PATCH 06/30] oeqa/core/threaded: Enable support to use the main thread Aníbal Limón
2017-07-11 20:23 ` [PATCH 07/30] oeqa/core/threaded: Add support to run into a thread at end of execution Aníbal Limón
2017-07-12 14:22   ` Leonardo Sandoval
2017-07-12 14:54     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 08/30] oeqa/core/threaded: logSummary add skipped tests info Aníbal Limón
2017-07-11 20:23 ` [PATCH 09/30] oeqa/core/tests: Update test_loader threaded to cover main thread usage Aníbal Limón
2017-07-11 20:23 ` [PATCH 10/30] oeqa/selftest/{case, context}: Add builddir by test class and context Aníbal Limón
2017-07-11 20:23 ` [PATCH 11/30] oeqa/selftest/case: Add wrappers to utils.commands modules Aníbal Limón
2017-07-11 20:23 ` [PATCH 12/30] oeqa/selftest/case: Creates meta-selftest layer per class Aníbal Limón
2017-07-11 20:23 ` [PATCH 13/30] oeqa/selftest/case: tearDown extra commands print what actually fails Aníbal Limón
2017-07-11 20:23 ` [PATCH 14/30] oeqa/selftest/case: Support bitbake memres mode in per build directory Aníbal Limón
2017-07-11 20:23 ` [PATCH 15/30] oeqa/selftest/cases: Use testlayer_path instead of call get_test_layer() Aníbal Limón
2017-07-11 20:23 ` [PATCH 16/30] oeqa/selftest/cases: Use builddir from class instead of get from environment Aníbal Limón
2017-07-11 20:23 ` [PATCH 17/30] oeqa/selftest/cases: Use wrapper methods from OESelfTestCase class Aníbal Limón
2017-07-11 20:23 ` [PATCH 18/30] oeqa/selftest/cases: tinfoil to run in the main thread Aníbal Limón
2017-07-12  6:56   ` Patrick Ohly
2017-07-12 14:55     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 19/30] oeqa/selftest/cases: imagefeatures enable threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 20/30] oeqa/selftest/cases: runqemu enable thraded runs Aníbal Limón
2017-07-12  7:15   ` Patrick Ohly
2017-07-12 15:01     ` Aníbal Limón [this message]
2017-07-14  9:35       ` Patrick Ohly
2017-07-14 15:27         ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 21/30] oeqa/selftest/cases: runtime enable threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 22/30] oeqa/selftest/cases: eSDK " Aníbal Limón
2017-07-11 20:23 ` [PATCH 23/30] oeqa/selftest/cases: devtool " Aníbal Limón
2017-07-11 20:23 ` [PATCH 24/30] oeqa/selftest/cases: recipetool enable for " Aníbal Limón
2017-07-11 20:23 ` [PATCH 25/30] oeqa/selftest/cases: Move devtool deploy test case to own module Aníbal Limón
2017-07-11 20:23 ` [PATCH 26/30] selftest/cases/devtool{, end}: Move update/finish_modify tests to its " Aníbal Limón
2017-07-11 20:23 ` [PATCH 27/30] seltest/cases/devtool: Build dbus on test_devtool_add_git_local Aníbal Limón
2017-07-11 20:23 ` [PATCH 28/30] argparse_oe: Add int_positive type Aníbal Limón
2017-07-12 14:33   ` Leonardo Sandoval
2017-07-12 14:56     ` Aníbal Limón
2017-07-11 20:23 ` [PATCH 29/30] oeqa/selftest/context: Enable support for threaded runs Aníbal Limón
2017-07-11 20:23 ` [PATCH 30/30] oeqa/selftest/cases: systemd_boot enable " Aníbal Limón
2017-07-11 20:31 ` ✗ patchtest: failure for oeqa core and oe-selftest threaded enablement Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec785117-31c8-db37-cfbe-b7bd34ce007f@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=joshua.g.lock@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=patrick.ohly@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.