public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Jermain Horsman" <jermain.horsman@nedap.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 5/5] oe-setup-build: add a tool for discovering config templates and setting up builds
Date: Thu, 08 Feb 2024 05:40:41 -0800	[thread overview]
Message-ID: <28123.1707399641733383554@lists.openembedded.org> (raw)
In-Reply-To: <20240131123908.1098544-5-alex@linutronix.de>

I just tried to run the selftest on bblayers using oe-core and not poky and I noticed some failures,
which I thought I'd share.

>          # The revision-under-test may not necessarily be available on the
> remote server,
> -        # so replace it with a revision that has a yocto-4.0 tag.
> +        # so replace it with a revision that has a yocto-4.1 tag.
>          import json
>          with open(jsonfile) as f:
>              data = json.load(f)
>          for s in data['sources']:
> -            data['sources'][s]['git-remote']['rev'] =
> '00cfdde791a0176c134f31e5a09eff725e75b905'
> +            data['sources'][s]['git-remote']['rev'] =
> '5200799866b92259e855051112520006e1aaaac0'

First I got a failure here, as this is not a valid reference on oe-core, only on poky is this valid.

> +def setup_build_env(args):
> +    templates = discover_templates(args.layerlist)
> +    if not templates:
> +        return
> +
> +    template = find_template(args.c, templates)
> +    if not template:
> +        return
> +    builddir = args.b if args.b else template["buildpath"]
> +    no_shell = args.no_shell
> +    coredir =
> os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)),
> '..'))
> +    cmd = "TEMPLATECONF={} . {} {}".format(template["templatepath"],
> os.path.join(coredir, 'oe-init-build-env'), builddir)
> +    if not no_shell:
> +        cmd = cmd + " && {}".format(os.environ['SHELL'])
> +    print("Running:", cmd)
> +    subprocess.run(cmd, shell=True, executable=os.environ['SHELL'])
> +

2024-02-08 13:14:26,793 - oe-selftest - INFO - ======================================================================
2024-02-08 13:14:26,793 - oe-selftest - INFO - FAIL: test_bitbakelayers_setup (bblayers.BitbakeLayers)
2024-02-08 13:14:26,794 - oe-selftest - INFO - ----------------------------------------------------------------------
2024-02-08 13:14:26,794 - oe-selftest - INFO - Traceback (most recent call last):
  File "/home/builder/workdir/openembedded-core-contrib/meta/lib/oeqa/selftest/cases/bblayers.py", line 189, in test_bitbakelayers_setup
    result = runCmd(cmd)
  File "/home/builder/workdir/openembedded-core-contrib/meta/lib/oeqa/utils/commands.py", line 212, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command '/home/builder/workdir/build-st/test-layer-checkout/setup-build --layerlist /home/builder/workdir/build-st/test-layer-checkout/.oe-layers.json setup -c meta-default --no-shell' returned non-zero exit status 1:
Available build configurations:

1. meta-default
This configuration does not have a description.

Re-run with 'list -v' to see additional information.
Running: TEMPLATECONF=/home/builder/workdir/build-st/test-layer-checkout/openembedded-core-contrib/meta/conf/templates/default . /home/builder/workdir/openembedded-core-contrib/oe-init-build-env /home/builder/workdir/build-st/build-meta-default
Traceback (most recent call last):
  File "/home/builder/workdir/build-st/test-layer-checkout/setup-build", line 119, in <module>
    args.func(args)
  File "/home/builder/workdir/build-st/test-layer-checkout/setup-build", line 98, in setup_build_env
    subprocess.run(cmd, shell=True, executable=os.environ['SHELL'])
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'SHELL'


I'm not entirely sure what was going on here, the SHELL variable was set in the shell environment, however it was not in os.environ.


  reply	other threads:[~2024-02-08 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 12:39 [PATCH 1/5] meta/conf/templates/default/conf-description.txt: add a template description Alexander Kanavin
2024-01-31 12:39 ` [PATCH 2/5] meta/lib/bblayers/buildconf.py: add support for configuration descriptions Alexander Kanavin
2024-01-31 12:39 ` [PATCH 3/5] scripts/oe-setup-builddir: " Alexander Kanavin
2024-01-31 12:39 ` [PATCH 4/5] scripts/oe-setup-layers: write a list of layer paths into the checkout's top dir Alexander Kanavin
2024-01-31 12:39 ` [PATCH 5/5] oe-setup-build: add a tool for discovering config templates and setting up builds Alexander Kanavin
2024-02-08 13:40   ` Jermain Horsman [this message]
2024-02-08 15:54     ` [OE-core] " Alexander Kanavin
2024-02-08 19:07       ` Jermain Horsman
2024-02-15 15:00 ` [OE-core] [PATCH 1/5] meta/conf/templates/default/conf-description.txt: add a template description Richard Purdie
2024-02-16 10:57   ` Alexander Kanavin
  -- strict thread matches above, loose matches on Subject: below --
2024-02-16 11:52 [PATCH 1/5] meta/conf/templates/default/conf-summary.txt: add a template summary Alexander Kanavin
2024-02-16 11:52 ` [PATCH 5/5] oe-setup-build: add a tool for discovering config templates and setting up builds Alexander Kanavin

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=28123.1707399641733383554@lists.openembedded.org \
    --to=jermain.horsman@nedap.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