All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Doug Goldstein <cardoe@cardoe.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH 1/2] automation: preserve built xen.efi
Date: Wed, 2 Oct 2024 22:46:02 +0200	[thread overview]
Message-ID: <Zv2xC7JPBEs1-aue@mail-itl> (raw)
In-Reply-To: <3ca5faa7-2276-4c85-a4ee-cc6ad5af3238@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 2257 bytes --]

On Wed, Oct 02, 2024 at 09:42:13PM +0100, Andrew Cooper wrote:
> On 02/10/2024 1:42 pm, Marek Marczykowski-Górecki wrote:
> > It will be useful for further tests.
> >
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > ---
> >  automation/scripts/build | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/automation/scripts/build b/automation/scripts/build
> > index b3c71fb6fb60..4cd41cb2c471 100755
> > --- a/automation/scripts/build
> > +++ b/automation/scripts/build
> > @@ -47,6 +47,7 @@ if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
> >  
> >      # Preserve artefacts
> >      cp xen/xen binaries/xen
> > +    if [[ -f xen/xen.efi ]]; then cp xen/xen.efi binaries/xen.efi; fi
> 
> Wouldn't
> 
>     # Preserve xen and optionally xen.efi
>     cp -f xen/xen xen/xen.efi binaries/
> 
> do this in a more concise way?

I don't think so, `cp -f` still fails if the source cannot be found.

> Alternatively, what about this:
> 
> diff --git a/automation/scripts/build b/automation/scripts/build
> index b3c71fb6fb60..14815ea7ad9c 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -41,6 +41,15 @@ cp xen/.config xen-config
>  # Directory for the artefacts to be dumped into
>  mkdir -p binaries
>  
> +collect_xen_artefacts ()
> +{
> +    for A in xen/xen xen/xen.efi; do
> +        if [[ -f $A ]]; then
> +            cp $A binaries/
> +        fi
> +    done
> +}
> +
>  if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
>      # Cppcheck analysis invokes Xen-only build
>      xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra --
> -j$(nproc)
> @@ -53,7 +62,7 @@ elif [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
>      make -j$(nproc) xen
>  
>      # Preserve artefacts
> -    cp xen/xen binaries/xen
> +    collect_xen_artefacts
>  else
>      # Full build.  Figure out our ./configure options
>      cfgargs=()
> 
> so we don't triplicate the handling?

That may be a better idea indeed.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-10-02 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 12:42 [PATCH 1/2] automation: preserve built xen.efi Marek Marczykowski-Górecki
2024-10-02 12:42 ` [PATCH 2/2] automation: add a smoke test for xen.efi on X86 Marek Marczykowski-Górecki
2024-10-02 21:03   ` Andrew Cooper
2024-10-02 22:16   ` Stefano Stabellini
2024-10-02 22:22     ` Stefano Stabellini
2024-10-02 22:55       ` Marek Marczykowski-Górecki
2024-10-02 23:08         ` Andrew Cooper
2024-10-02 23:30         ` Stefano Stabellini
2024-10-03  0:24           ` Marek Marczykowski-Górecki
2024-10-03  0:32             ` Stefano Stabellini
2024-10-03 20:24               ` Stefano Stabellini
2024-10-02 20:42 ` [PATCH 1/2] automation: preserve built xen.efi Andrew Cooper
2024-10-02 20:46   ` Marek Marczykowski-Górecki [this message]
2024-10-02 22:16     ` Stefano Stabellini

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=Zv2xC7JPBEs1-aue@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.