public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] oeqa/buildtools-cases: Allow bitbake time to shutdown
Date: Tue, 31 Aug 2021 14:10:47 +0000	[thread overview]
Message-ID: <7864781c8f9c4c1aa207dc937f445131@axis.com> (raw)
In-Reply-To: <20210831131540.867057-1-richard.purdie@linuxfoundation.org>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 31 augusti 2021 15:16
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH] oeqa/buildtools-cases: Allow bitbake time to
> shutdown
> 
> bitbake may still be shutting down when the UI exists. Wait for the lock

I assume you mean "exits" rather than "exists"?

//Peter

> to disappear before trying to delete the directory to avoid errors.
> 
> Traceback (most recent call last):
>   File "/home/pokybuild/yocto-
> worker/buildtools/build/meta/lib/oeqa/sdk/buildtools-cases/build.py", line
> 23, in test_libc
>     self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' %
> (corebase, testdir))
>   File "/usr/lib64/python3.7/tempfile.py", line 807, in __exit__
>     self.cleanup()
>   File "/usr/lib64/python3.7/tempfile.py", line 811, in cleanup
>     _shutil.rmtree(self.name)
>   File "/usr/lib64/python3.7/shutil.py", line 494, in rmtree
>     _rmtree_safe_fd(fd, path, onerror)
>   File "/usr/lib64/python3.7/shutil.py", line 452, in _rmtree_safe_fd
>     onerror(os.unlink, fullname, sys.exc_info())
>   File "/usr/lib64/python3.7/shutil.py", line 450, in _rmtree_safe_fd
>     os.unlink(entry.name, dir_fd=topfd)
> FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock'
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/lib/oeqa/sdk/buildtools-cases/build.py | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oeqa/sdk/buildtools-cases/build.py
> b/meta/lib/oeqa/sdk/buildtools-cases/build.py
> index 5a17ab98c6c..a69e4a2443f 100644
> --- a/meta/lib/oeqa/sdk/buildtools-cases/build.py
> +++ b/meta/lib/oeqa/sdk/buildtools-cases/build.py
> @@ -3,6 +3,7 @@
>  #
> 
>  import os, tempfile
> +import time
>  from oeqa.sdk.case import OESDKTestCase
>  from oeqa.utils.subprocesstweak import errors_have_output
>  errors_have_output()
> @@ -20,4 +21,10 @@ class BuildTests(OESDKTestCase):
>                  conf.write('\n')
>                  conf.write('DL_DIR = "%s"\n' % self.td['DL_DIR'])
> 
> -            self._run('. %s/oe-init-build-env %s && bitbake virtual/libc'
> % (corebase, testdir))
> +            try:
> +                self._run('. %s/oe-init-build-env %s && bitbake
> virtual/libc' % (corebase, testdir))
> +            finally:
> +                delay = 10
> +                while delay and os.path.exists(testdir +
> "/build//bitbake.lock"):
> +                    time.sleep(1)
> +                    delay = delay - 1
> --
> 2.32.0


      reply	other threads:[~2021-08-31 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 13:15 [PATCH] oeqa/buildtools-cases: Allow bitbake time to shutdown Richard Purdie
2021-08-31 14:10 ` Peter Kjellerstedt [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=7864781c8f9c4c1aa207dc937f445131@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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