qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests: dump config.log when configure fails in docker job
@ 2018-02-15 17:16 Daniel P. Berrangé
  2018-02-15 18:24 ` Eric Blake
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel P. Berrangé @ 2018-02-15 17:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé,
	Eric Blake, Daniel P. Berrangé

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
+    $QEMU_SRC/configure $config_opts || cat config.log
+    make $MAKEFLAGS
 }
 
 test_fail()
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: dump config.log when configure fails in docker job
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2018-02-15 18:24 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel
  Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-15 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).