diff mbox

[v2] docker: dump 'config.log' if ./configure fails

Message ID 20180315142713.30960-1-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show

Commit Message

Philippe Mathieu-Daudé March 15, 2018, 2:27 p.m. UTC
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
v2:
- avoid subshell using { ; } (Eric)
- use test_fail() instead of prep_fail() (Fam)

 tests/docker/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Fam Zheng March 16, 2018, 1:34 a.m. UTC | #1
On Thu, 03/15 15:27, Philippe Mathieu-Daudé wrote:
> Suggested-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> v2:
> - avoid subshell using { ; } (Eric)
> - use test_fail() instead of prep_fail() (Fam)
> 
>  tests/docker/common.rc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/docker/common.rc b/tests/docker/common.rc
> index 7951555e3f..046f8a5921 100755
> --- a/tests/docker/common.rc
> +++ b/tests/docker/common.rc
> @@ -30,7 +30,9 @@ build_qemu()
>                   $@"
>      echo "Configure options:"
>      echo $config_opts
> -    $QEMU_SRC/configure $config_opts && make $MAKEFLAGS
> +    $QEMU_SRC/configure $config_opts || \
> +        { cat config.log && test_fail "Failed to run 'configure'"; }
> +    make $MAKEFLAGS
>  }
>  
>  test_fail()
> -- 
> 2.16.2
> 

Queued, thanks!

Fam
diff mbox

Patch

diff --git a/tests/docker/common.rc b/tests/docker/common.rc
index 7951555e3f..046f8a5921 100755
--- a/tests/docker/common.rc
+++ b/tests/docker/common.rc
@@ -30,7 +30,9 @@  build_qemu()
                  $@"
     echo "Configure options:"
     echo $config_opts
-    $QEMU_SRC/configure $config_opts && make $MAKEFLAGS
+    $QEMU_SRC/configure $config_opts || \
+        { cat config.log && test_fail "Failed to run 'configure'"; }
+    make $MAKEFLAGS
 }
 
 test_fail()