public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Cc: Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: Error logging broken with next?
Date: Tue, 24 May 2022 22:50:10 +0300	[thread overview]
Message-ID: <fd15c725-0da3-292a-6255-f0bd57943f67@ilbers.de> (raw)
In-Reply-To: <8dfafe2e-de10-458b-82b2-591983d8bb8c@siemens.com>

24.05.2022 19:36, Jan Kiszka wrote:
> I'm afraid we are talking past each other. This is what I retried again:
> $ . oe-init-build-env build
>
> recipe.bb:
> LICENSE = ""
>
> test_fun() {
>      echo "FAIL!"
>      false
> }
>
> python do_test() {
>      bb.build.exec_func("test_fun", d)
> }
> addtask test
>
> conf/local.conf:
> ...
>
> BBFILES += "recipe.bb"
>
>
> $ bitbake -c test recipe
> ...
> NOTE: No setscene tasks
> NOTE: Executing Tasks
> ERROR: recipe-1.0-r0 do_test: ExecutionError('/poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/run.test_fun.260', 1, None, None)
> ERROR: Logfile of failure stored in: /poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/log.do_test.260
> Log data follows:
> | DEBUG: Executing python function do_test
> | DEBUG: Executing shell function test_fun
> | FAIL!
> | WARNING: exit code 1 from a shell command.
> | DEBUG: Python function do_test finished
> ERROR: Task (recipe.bb:do_test) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and 1 failed.
>
> Summary: 1 task failed:
>    recipe.bb:do_test
> Summary: There was 1 ERROR message, returning a non-zero exit code.
>
> All fine for me.
>
> Is this what you saw as well?
Hmm... no.
What Yocto/Bitbake version did you use?
I'm using Yocto 3.4 based on Bitbake 1.52.0 as the most similar to the 
version we use in Isar (1.50.5).
And in Yocto 3.4 there is no log for that example.
> Now with Isar, using isar-init-build-env instead:
> ...
> NOTE: No setscene tasks
> NOTE: Executing Tasks
> ERROR: recipe-1.0-r0 do_test: Error executing a python function in exec_python_func() autogenerated:
>
> The stack trace of python calls that resulted in this exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
>       0001:
>   *** 0002:do_test(d)
>       0003:
> File: 'recipe.bb', lineno: 9, function: do_test
>    File "recipe.bb", line 9, in do_test
>      bb.build.exec_func("test_fun", d)
>
> File: '/isar/bitbake/lib/bb/build.py', lineno: 256, function: exec_func
>       0252:    with bb.utils.fileslocked(lockfiles):
>       0253:        if ispython:
>       0254:            exec_func_python(func, d, runfile, cwd=adir)
>       0255:        else:
>   *** 0256:            exec_func_shell(func, d, runfile, cwd=adir)
>       0257:
>       0258:    try:
>       0259:        curcwd = os.getcwd()
>       0260:    except:
> File: '/isar/bitbake/lib/bb/build.py', lineno: 507, function: exec_func_shell
>       0503:    with open(fifopath, 'r+b', buffering=0) as fifo:
>       0504:        try:
>       0505:            bb.debug(2, "Executing shell function %s" % func)
>       0506:            with open(os.devnull, 'r+') as stdin, logfile:
>   *** 0507:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
>       0508:        except bb.process.ExecutionError as exe:
>       0509:            # Find the backtrace that the shell trap generated
>       0510:            backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)")
>       0511:            stdout_lines = (exe.stdout or "").split("\n")
> File: '/isar/bitbake/lib/bb/process.py', lineno: 186, function: run
>       0182:
>       0183:    if pipe.returncode != 0:
>       0184:        if log:
>       0185:            # Don't duplicate the output in the exception if logging it
>   *** 0186:            raise ExecutionError(cmd, pipe.returncode, None, None)
>       0187:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
>       0188:    return stdout, stderr
> Exception: bb.process.ExecutionError: Execution of '/isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/run.test_fun.1487' failed with exit code 1
>
> ERROR: Logfile of failure stored in: /isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/log.do_test.1487
> ERROR: Task (recipe.bb:do_test) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and 1 failed.
>
> Summary: 1 task failed:
>    recipe.bb:do_test
> Summary: There was 1 ERROR message shown, returning a non-zero exit code.
>
>
> This is NOT what we want to have. And this is an Isar bug at this level.
>
> Jan
>

  reply	other threads:[~2022-05-24 19:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 16:49 Jan Kiszka
2022-05-16  7:49 ` Baurzhan Ismagulov
2022-05-16 11:05   ` Jan Kiszka
2022-05-17 12:35 ` Anton Mikanovich
2022-05-17 13:42   ` Anton Mikanovich
2022-05-19  6:01     ` Jan Kiszka
2022-05-23 19:06       ` Jan Kiszka
2022-05-24  7:43         ` Anton Mikanovich
2022-05-24 14:23         ` Anton Mikanovich
2022-05-24 15:54           ` Jan Kiszka
2022-05-24 15:57             ` Jan Kiszka
2022-05-24 16:05               ` Anton Mikanovich
2022-05-24 16:07                 ` Jan Kiszka
2022-05-24 16:14                   ` Anton Mikanovich
2022-05-24 16:36                     ` Jan Kiszka
2022-05-24 19:50                       ` Anton Mikanovich [this message]
2022-05-25  5:30                         ` Anton Mikanovich
2022-05-25  6:40                           ` Jan Kiszka
2022-05-24 16:02             ` Anton Mikanovich

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=fd15c725-0da3-292a-6255-f0bd57943f67@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox