All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Wood <michael.g.wood@intel.com>
To: sujith h <sujith.h@gmail.com>
Cc: toaster@yoctoproject.org
Subject: Re: Usage of already cloned layers in toaster
Date: Tue, 28 Jul 2015 19:51:00 +0100	[thread overview]
Message-ID: <55B7CF14.7000409@intel.com> (raw)
In-Reply-To: <CADyYWLn=NAj2VhE=XRiypAehPUuJ2ODYV2ymQA-+0XUX7dXQ2Q@mail.gmail.com>

On 27/07/15 16:23, sujith h wrote:
>
>
> On Mon, Jul 27, 2015 at 6:55 PM, Michael Wood 
> <michael.g.wood@intel.com <mailto:michael.g.wood@intel.com>> wrote:
>
>     On 27/07/15 11:31, sujith h wrote:
>
>
>
>         On Mon, Jul 27, 2015 at 3:39 PM, Barros Pena, Belen
>         <belen.barros.pena@intel.com
>         <mailto:belen.barros.pena@intel.com>
>         <mailto:belen.barros.pena@intel.com
>         <mailto:belen.barros.pena@intel.com>>> wrote:
>
>
>
>             On 27/07/2015 07:54, "sujith h" <sujith.h@gmail.com
>         <mailto:sujith.h@gmail.com>
>             <mailto:sujith.h@gmail.com <mailto:sujith.h@gmail.com>>>
>         wrote:
>
>             >
>             >
>             >On Fri, Jul 24, 2015 at 6:36 PM, Barros Pena, Belen
>             ><belen.barros.pena@intel.com
>         <mailto:belen.barros.pena@intel.com>
>             <mailto:belen.barros.pena@intel.com
>         <mailto:belen.barros.pena@intel.com>>> wrote:
>             >
>             >
>             >
>             >On 24/07/2015 13:57, "sujith h" <sujith.h@gmail.com
>         <mailto:sujith.h@gmail.com>
>             <mailto:sujith.h@gmail.com <mailto:sujith.h@gmail.com>>>
>         wrote:
>             >
>             >
>             >* Which version of Yocto Project you are using (fido or
>         master)?
>             >
>             >I am using fido branch.
>             >
>             >
>             >* Which release you have selected for your project?
>             >
>             >
>             >In the release I have selected "Local Yocto Project"
>             >
>             >
>             >* If you click the "view all compatible layers" link and
>         in that
>             page you
>             >search for meta-oe, do you get any results?
>             >
>             >I can see only "meta-yocto-bsp", "meta-yocto" and
>             "openembedded-core".
>             >Attached screenshot of the same.
>             >
>             >
>             >Also attaching screenshot of page where I try to import
>         meta-oe
>             from my
>             >locally cloned location.
>             >
>             >
>             >Below is the file structure I have:
>             >
>             >sujith@kdekid:~/MEL/homework$ pwd
>             >/home/sujith/MEL/homework
>             >sujith@kdekid:~/MEL/homework$ ls -l
>             >total 5180
>             >drwxrwxr-x 19 sujith sujith    4096 Jun 12 18:40
>         meta-oe-local
>             >drwxrwxr-x 19 sujith sujith    4096 Jul 24 18:04
>             meta-openembedded-local
>             >drwxrwxr-x  8 sujith sujith    4096 Jul 24 18:02
>         meta-qt5-local
>             >drwxrwxr-x 11 sujith sujith    4096 Jul 27 12:07 poky
>             >drwxrwxr-x  2 sujith sujith    4096 Jul 27 12:08
>             toaster_build_artifacts
>             >-rw-r--r--  1 sujith sujith 5277696 Jul 27 12:19
>         toaster.sqlite
>             >drwxrwxr-x  6 sujith sujith    4096 Jul 24 16:25 venv
>             >sujith@kdekid:~/MEL/homework$
>             >
>
>             Right, I've managed to reproduce this. Looking at the browser
>             console, it
>             might be a problem with the javascript doing the layer name
>             validation. If
>             you change the layer name to something completely random
>         that does not
>             exist in the Toaster database (something like meta-xyz),
>         can you
>             import
>             the layer?
>
>
>         Am bit new to the web world. So I gave a try with firebug to
>         debug which script ( Javascript or any ) call happens
>         when I click "Import  and add to project" button. Even after
>         changing meta-oe repo to meta-xyz as per suggestion,
>         the result remains same. But this is the output I see in the
>         firebug console:
>         |{"current_id": 5, "current_url":
>         "git://git.openembedded.org/meta-openembedded
>         <http://git.openembedded.org/meta-openembedded>
>         <http://git.openembedded.org/meta-openembedded>", "error":
>         "hint-layer-exists-with-different-url"||}|
>         hint-layer-exists-with-different-url
>
>         Also attaching the screenshot of the same ( to get more clarity ).
>
>
>     Thanks for this, I noticed this wasn't working properly last week,
>     and rolled a couple of patches to fix these regressions.
>
>
>     http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=michaelw/toaster/wip-nav-project-changes&id=0181c56dd608427c0a7bd986df75bf7a1189e064
>
>     and
>
>
>     http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=michaelw/toaster/wip-nav-project-changes&id=aa5b023f03f5465ea22318a1f21199ce434eb700
>
>     I have a few other things to fix on this branch as I have been
>     fixing a number of things to allow me to test the new project
>     page, I'm intending to roll a separate branch for review on it.
>
>     You've highlighted that we need a unit test which does a layer
>     import using the back end API calls, which although it wouldn't
>     have caught this error would be really good to have, if you're
>     interested in helping with that?
>
>
> It would be my pleasure to help :) I might need some assistance as I 
> am learning Django. May be some hint like where to start with or so.
>

This is the best place to start
https://docs.djangoproject.com/en/1.6/topics/testing/overview/

In ./bitbake 
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake>/lib 
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib>/toaster 
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/toaster>/toastergui 
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/toaster/toastergui>/tests.py 
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/toaster/toastergui/tests.py>

We can add something like

class ImportLayerTestCase(|ProvisionedLayersProjectTestCase|):
....
...
     def test_import_layer(self):
         client.post(reverse('xhr_importlayer',.....

...

We can then use the JSON response from the client to help validate the 
data coming back as well as checking the import layer actually entered 
the database.

There are a few examples in the yocto error-report-web project too that 
might be useful to look at e.g.
  http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/tree/Post/test.py#n153 <http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/tree/Post/test.py#n153>

You can run the test by doing running ./manage.py test toastergui


Thanks,

Michael


  reply	other threads:[~2015-07-28 18:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24  9:56 Usage of already cloned layers in toaster Barros Pena, Belen
2015-07-24 10:21 ` Damian, Alexandru
2015-07-24 12:57 ` sujith h
2015-07-24 13:06   ` Barros Pena, Belen
2015-07-27  6:54     ` sujith h
2015-07-27 10:09       ` Barros Pena, Belen
2015-07-27 10:29         ` Barros Pena, Belen
2015-07-27 10:38           ` sujith h
2015-07-27 10:59             ` Barros Pena, Belen
2015-07-27 10:31         ` sujith h
2015-07-27 13:25           ` Michael Wood
2015-07-27 15:23             ` sujith h
2015-07-28 18:51               ` Michael Wood [this message]
2015-07-29 14:39                 ` sujith h
2015-07-31 13:06                   ` sujith h
2015-08-03 10:26                     ` Michael Wood
2015-08-04 10:35                       ` sujith h
2015-08-04 13:16                         ` sujith h
  -- strict thread matches above, loose matches on Subject: below --
2015-07-24  9:37 Haridasan, Sujith
2015-07-23  6:14 Haridasan, Sujith

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=55B7CF14.7000409@intel.com \
    --to=michael.g.wood@intel.com \
    --cc=sujith.h@gmail.com \
    --cc=toaster@yoctoproject.org \
    /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.