Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 02/12] testsdk: Handle minimal eSDK and avoid download costs
Date: Wed, 01 Mar 2017 16:11:01 +0000	[thread overview]
Message-ID: <1488384661.24526.41.camel@linuxfoundation.org> (raw)
In-Reply-To: <1488384162-18397-2-git-send-email-richard.purdie@linuxfoundation.org>

Sorry I missed this one when fixing the patches, I'll add a commit
message which says:

"""
When using a minimal eSDK, testing currently fails as the sdk isn't
populated. We therefore setup the eSDK under test to point at local
sstate and execute a command to ensure the toolchain is populated
since most of the tests depend on this being present.

At the same time, add in a link to DL_DIR through own-mirrors so
that tests which fetch source (e.g. the kernel module one) can use the
local stash. This cuts test execution of the kernel module test from
2000s to 120s.

We did try using DL_DIR directly but that causes uninative issues
requiring other workarounds so own-mirrors is neater.

Together these fixes unbreak eSDK testing on the autobuilder.
"""

On Wed, 2017-03-01 at 16:02 +0000, Richard Purdie wrote:
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/testsdk.bbclass | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/meta/classes/testsdk.bbclass
> b/meta/classes/testsdk.bbclass
> index 75b4027..802e57f 100644
> --- a/meta/classes/testsdk.bbclass
> +++ b/meta/classes/testsdk.bbclass
> @@ -149,6 +149,17 @@ def testsdkext_main(d):
>          bb.plain("Extensible SDK testing environment: %s" % s)
>  
>          sdk_env = sdk_envs[s]
> +
> +        # Use our own SSTATE_DIR and DL_DIR so that updates to the
> eSDK come from our sstate cache
> +        # and we don't spend hours downloading kernels for the
> kernel module test
> +        with open(os.path.join(sdk_dir, 'conf', 'local.conf'), 'a+')
> as f:
> +            f.write('SSTATE_MIRRORS = "file://.* file://%s/PATH"\n'
> % test_data.get('SSTATE_DIR'))
> +            f.write('SOURCE_MIRROR_URL = "file://%s"\n' %
> test_data.get('DL_DIR'))
> +            f.write('INHERIT += "own-mirrors"')
> +
> +        # We need to do this in case we have a minimal SDK
> +        subprocess.check_output(". %s > /dev/null; devtool sdk-
> install meta-extsdk-toolchain" % sdk_env, cwd=sdk_dir, shell=True)
> +
>          tc = OESDKExtTestContext(td=test_data, logger=logger,
> sdk_dir=sdk_dir,
>              sdk_env=sdk_env,
> target_pkg_manifest=target_pkg_manifest,
>              host_pkg_manifest=host_pkg_manifest)


  reply	other threads:[~2017-03-01 16:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 16:02 [PATCH 01/12] oeqa/sdkext/devtool: rename recipe name to match upstream Richard Purdie
2017-03-01 16:02 ` [PATCH 02/12] testsdk: Handle minimal eSDK and avoid download costs Richard Purdie
2017-03-01 16:11   ` Richard Purdie [this message]
2017-03-01 16:02 ` [PATCH 03/12] devtool/sdk: Run build-sysroots after installing new things Richard Purdie
2017-03-01 16:02 ` [PATCH 04/12] oeqa/sdkext: Ensure we run a deterministic set of tests Richard Purdie
2017-03-01 16:02 ` [PATCH 05/12] oeqs/sdk*/case: Use universal_newlines for subprocess calls Richard Purdie
2017-03-01 16:02 ` [PATCH 06/12] oeqa/sdkext/context: Work around broken dependency checks to get sdk tests running Richard Purdie
2017-03-01 16:02 ` [PATCH 07/12] populate_sdk_ext: Allow generation of meta-extsdk-toolchain even for minimal SDKs Richard Purdie
2017-03-01 16:02 ` [PATCH 08/12] oeqa/selftest: Drop http sstate sharing Richard Purdie
2017-03-01 16:02 ` [PATCH 09/12] oeqa/esdk/devtool: clean setUpClass/tearDownClass Richard Purdie
2017-03-01 16:02 ` [PATCH 10/12] oeqa: add output to subprocess exceptions Richard Purdie
2017-03-01 16:02 ` [PATCH 11/12] oeqa/sdkext/devtool: use finally instead of repeating cleanup Richard Purdie
2017-03-01 16:02 ` [PATCH 12/12] oeqa/sdkext: don't skip tests if there isn't a toolchain Richard Purdie

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=1488384661.24526.41.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --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