public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH] testsuite: Always cleanup gpg agent
Date: Fri, 12 May 2023 20:36:02 +0200	[thread overview]
Message-ID: <20230512203602.58c4087e@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20230509082508.1658927-1-amikan@ilbers.de>

ACK.

Am Tue,  9 May 2023 11:25:08 +0300
schrieb Anton Mikanovich <amikan@ilbers.de>:

> In addition to 1284155a cleanup gpg agent even if test fails.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  testsuite/cibase.py | 28 +++++++++++++++-------------
>  1 file changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/testsuite/cibase.py b/testsuite/cibase.py
> index d1543a9b..df8b350e 100755
> --- a/testsuite/cibase.py
> +++ b/testsuite/cibase.py
> @@ -42,24 +42,26 @@ class CIBaseTest(CIBuilder):
>          if result.exit_status:
>              self.fail('GPG import failed')
>  
> -        self.bitbake(targets, **kwargs)
> +        try:
> +            self.bitbake(targets, **kwargs)
>  
> -        self.delete_from_build_dir('tmp')
> -        self.configure(gpg_pub_key=gpg_pub_key if signed else None,
> offline=True, sstate_dir="", **kwargs)
> +            self.delete_from_build_dir('tmp')
> +            self.configure(gpg_pub_key=gpg_pub_key if signed else
> None, offline=True, sstate_dir="", **kwargs) 
> -        self.bitbake(targets, **kwargs)
> +            self.bitbake(targets, **kwargs)
>  
> -        # Disable use of cached base repository
> -        self.unconfigure()
> +            # Disable use of cached base repository
> +            self.unconfigure()
>  
> -        if not signed:
> -            # Try to build with changed configuration with no cleanup
> -            self.configure(**kwargs)
> -            self.bitbake(targets, **kwargs)
> +            if not signed:
> +                # Try to build with changed configuration with no
> cleanup
> +                self.configure(**kwargs)
> +                self.bitbake(targets, **kwargs)
>  
> -        # Cleanup
> -        process.run('gpgconf --kill gpg-agent')
> -        shutil.rmtree(gnupg_home, True)
> +        finally:
> +            # Cleanup
> +            process.run('gpgconf --kill gpg-agent')
> +            shutil.rmtree(gnupg_home, True)
>  
>      def perform_ccache_test(self, targets, **kwargs):
>          def ccache_stats(dir, field):


  reply	other threads:[~2023-05-12 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  8:25 Anton Mikanovich
2023-05-12 18:36 ` Henning Schild [this message]
2023-05-19  4:15 ` Uladzimir Bely

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=20230512203602.58c4087e@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.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