From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Fam Zheng" <famz@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH] tests: dump config.log when configure fails in docker job
Date: Thu, 15 Feb 2018 12:24:16 -0600 [thread overview]
Message-ID: <2218393d-c61a-32c5-68bf-ffd993d209dc@redhat.com> (raw)
In-Reply-To: <20180215171611.11962-1-berrange@redhat.com>
On 02/15/2018 11:16 AM, Daniel P. Berrangé wrote:
> When configure fails inside a docker job it is not easy to get access to
> the config.log file. It is nicer for developers if we just splatter the
> contents of config.log to stdout upon failure
>
> Suggested-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> tests/docker/common.rc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/docker/common.rc b/tests/docker/common.rc
> index 7951555e3f..ecbea13443 100755
> --- a/tests/docker/common.rc
> +++ b/tests/docker/common.rc
> @@ -30,7 +30,8 @@ build_qemu()
> $@"
> echo "Configure options:"
> echo $config_opts
> - $QEMU_SRC/configure $config_opts && make $MAKEFLAGS
The old code dies if either configure or make has non-zero exit status.
> + $QEMU_SRC/configure $config_opts || cat config.log
> + make $MAKEFLAGS
But this turns a failure of configure into a successful exit status
(presuming that cat doesn't also fail), which means we try the make no
matter whether configure succeeded.
Better might be:
$QEMU_SRC/configure $config_opts || { cat config.log; exit 1; }
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
prev parent reply other threads:[~2018-02-15 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 17:16 [Qemu-devel] [PATCH] tests: dump config.log when configure fails in docker job Daniel P. Berrangé
2018-02-15 18:24 ` Eric Blake [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=2218393d-c61a-32c5-68bf-ffd993d209dc@redhat.com \
--to=eblake@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).