public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Qi.Chen@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] oeqa/selftest: add test case to cover 'devtool modify -n' for a git recipe
Date: Fri, 26 Jan 2024 15:05:38 +0000	[thread overview]
Message-ID: <9caed0062b52599a36ddc6a633b8b7cf3f6b0b75.camel@linuxfoundation.org> (raw)
In-Reply-To: <CANNYZj_BdzBG1WjoAvgWwUvS_9Ys_HhOSc6s=0UbR5Bi2rZSYQ@mail.gmail.com>

On Fri, 2024-01-26 at 16:00 +0100, Alexander Kanavin wrote:
> On Fri, 26 Jan 2024 at 15:54, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> 
> > > +    def test_devtool_modify_git_no_extract(self):
> > > +        # Check preconditions
> > > +        testrecipe = 'psplash'
> > > +        src_uri = get_bb_var('SRC_URI', testrecipe)
> > > +        self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
> > > +        # Clean up anything in the workdir/sysroot/sstate cache
> > > +        bitbake('%s -c cleansstate' % testrecipe)
> > 
> > I'm afraid we can't use cleansstate inside oe-selftest as it may race
> > against other copies of oe-selftest running against the same sstate
> > cache (or other builds using psplash in this case).
> > 
> > We'll need to find another way to make this work.
> 
> There's a number of existing tests in
> meta/lib/oeqa/selftest/cases/devtool.py which do rely on cleansstate;
> I can only presume they do it with utmost care, and can be used as
> examples for how things could be done.

Thanks for the reminder. devtool is "special" in that it does:

        cls.sstate_conf  = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
        cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n' % cls.original_sstate)

in DevtoolBase which means it can call cleansstate.

I'll queue it for merge, thanks.

Cheers,

Richard





      reply	other threads:[~2024-01-26 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22  5:29 [OE-core][PATCH] oeqa/selftest: add test case to cover 'devtool modify -n' for a git recipe Qi.Chen
2024-01-26 14:54 ` Richard Purdie
2024-01-26 15:00   ` Alexander Kanavin
2024-01-26 15:05     ` Richard Purdie [this message]

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=9caed0062b52599a36ddc6a633b8b7cf3f6b0b75.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Qi.Chen@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox