From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel@nongnu.org, "Beraldo Leal" <bleal@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH 2/2] gitlab: show configure/make args before running
Date: Fri, 4 Nov 2022 13:19:43 +0000 [thread overview]
Message-ID: <Y2URb1qkDbSdDmmd@redhat.com> (raw)
In-Reply-To: <395832eb-2eb6-bdf6-21c1-0f643b0bbf58@linaro.org>
On Fri, Nov 04, 2022 at 08:31:31AM +1100, Richard Henderson wrote:
> On 11/4/22 06:06, Stefan Hajnoczi wrote:
> > On Thu, 3 Nov 2022 at 13:30, Daniel P. Berrangé <berrange@redhat.com> wrote:
> > >
> > > When debugging failed jobs it is helpful to see the
> > > full configure/make args used, without having to search
> > > the gitlab config file to figure it out.
> > >
> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > ---
> > > .gitlab-ci.d/buildtest-template.yml | 4 ++++
> > > .gitlab-ci.d/crossbuild-template.yml | 15 +++++++++++++++
> > > 2 files changed, 19 insertions(+)
> >
> > On IRC Mark suggested sh -xc "$CMD" to avoid duplication. I'm not sure
> > how to get escaping right though.
>
> set -x && ../configure ... ?
I tried adding 'set -x' to the script: blocks too. It turns out that
gitlab has an echo '$CMD' for each line in the yaml script: section
IOW, with my patch here we get a log that looks like
$ mkdir build
$ cd build
$ if test -n "$TARGETS"; then echo "../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list=\"$TARGETS\"" ; ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ; else echo "../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS" ; ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ; fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
../configure --enable-werror --disable-docs --disable-gcrypt --enable-nettle --enable-docs --enable-fdt=system --enable-slirp --enable-capstone --target-list="tricore-softmmu microblaze-softmmu mips-softmmu xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu"
and with adding 'set -x' we get
++ echo '$ mkdir build'
$ mkdir build
++ mkdir build
++ echo '$ cd build'
$ cd build
++ cd build
++ echo '$ if test -n "$TARGETS"; then ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ; else ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ; fi || { cat config.log meson-logs/meson-log.txt && exit 1; }'
$ if test -n "$TARGETS"; then ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ; else ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ; fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
++ test -n 'tricore-softmmu microblaze-softmmu mips-softmmu xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu'
++ ../configure --enable-werror --disable-docs --disable-gcrypt --enable-nettle --enable-docs --enable-fdt=system --enable-slirp --enable-capstone '--target-list=tricore-softmmu microblaze-softmmu mips-softmmu xtensa-sof
Doing 'set -x && configure' only marginally helps, as the 'set -x' still
takes effect for all commands that come after configure too.
The other option is to not do either 'echo' not 'set -x', and instead
do this:
printenv | grep -v -E "(CI_|GITLAB)"
so that the build logs has a dump of any env vars set. So when seeing
./configure $CONFIGURE_ARGS
we have a record of what $CONFIGURE_ARGS was set to.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-11-04 13:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 17:30 [PATCH 0/2] gitlab: improve debuggability of jobs Daniel P. Berrangé
2022-11-03 17:30 ` [PATCH 1/2] gitlab: remove redundant setting of PKG_CONFIG_PATH Daniel P. Berrangé
2022-11-03 19:01 ` Stefan Hajnoczi
2022-11-03 17:30 ` [PATCH 2/2] gitlab: show configure/make args before running Daniel P. Berrangé
2022-11-03 19:06 ` Stefan Hajnoczi
2022-11-03 21:31 ` Richard Henderson
2022-11-04 13:19 ` Daniel P. Berrangé [this message]
2022-12-22 8:26 ` [PATCH 0/2] gitlab: improve debuggability of jobs Paolo Bonzini
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=Y2URb1qkDbSdDmmd@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=bleal@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@gmail.com \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.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 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.