Skip to contentSkip to conversation

docker: dump 'config.log' if ./configure fails

PATCH Superseded Philippe Mathieu-Daudé 4 participants 6 messages Feb 15, 2018 – Feb 25, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docker: dump 'config.log' if ./configure fails

---
 tests/docker/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/common.rc +3 -1
index 7951555e3f..dd011cdf1e 100755
@@ -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 && prep_fail "Failed to run 'configure'")
+    make $MAKEFLAGS
 }
 
 test_fail()
Signature · 1 line
2.16.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé
---
 tests/docker/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/common.rc +0 -0
index 7951555e3f..dd011cdf1e 100755

tests/docker/common.rc build_qemu() · line 36

Quoted 8 lines
tests/docker/common.rc +3 -1
@@ -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 && prep_fail "Failed to run 'configure'")
+    make $MAKEFLAGS
 }

Slightly nicer than my patch thanks to the prep_fail addition.

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#2 lore raw
Quoted 23 lines · Daniel P. Berrangé
Quoted 11 lines · Philippe Mathieu-Daudé
---
 tests/docker/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/common.rc +0 -0
index 7951555e3f..dd011cdf1e 100755

tests/docker/common.rc build_qemu() · line 36

Quoted 8 lines
tests/docker/common.rc +3 -1
@@ -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 && prep_fail "Failed to run 'configure'")
+    make $MAKEFLAGS
 }
Quoted 1 line

Slightly nicer than my patch thanks to the prep_fail addition.

Haha this was a funny experience of parallel programming :)

However your patch has a slightly nicer description!

Quoted 5 lines

Regards,
Daniel

#3 lore raw
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Daniel P. Berrangé
Quoted 6 lines · Philippe Mathieu-Daudé
---
  tests/docker/common.rc | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 11 lines
Quoted 11 lines

tests/docker/common.rc build_qemu() · line 34

Quoted 11 lines
tests/docker/common.rc +2 -1
index 7951555e3f..dd011cdf1e 100755
@@ -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 && prep_fail "Failed to run 'configure'")

Is a subshell necessary; or can you get by with the simpler
{ cat && prep_fail "..."; }

Quoted 10 lines
Quoted 6 lines

tests/docker/common.rc build_qemu() · line 36

Quoted 2 lines
tests/docker/common.rc +1 -0
+    make $MAKEFLAGS
  }

Slightly nicer than my patch thanks to the prep_fail addition.

Haha this was a funny experience of parallel programming :)

However your patch has a slightly nicer description!

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#4 lore raw
Quoted 9 lines · Eric Blake
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Daniel P. Berrangé
Quoted 6 lines · Philippe Mathieu-Daudé

---
  tests/docker/common.rc | 4 +++-

  1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
tests/docker/common.rc +0 -0
index 7951555e3f..dd011cdf1e 100755
@@ -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 && prep_fail "Failed to run 'configure'")

Is a subshell necessary; or can you get by with the simpler { cat && prep_fail "..."; }

You are right, since the subshell is not necessary, better to use { ;}

TIL :)

Quoted 13 lines
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines

+    make $MAKEFLAGS
  }

Slightly nicer than my patch thanks to the prep_fail addition.

Haha this was a funny experience of parallel programming :)

However your patch has a slightly nicer description!

#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé
---
 tests/docker/common.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/common.rc +0 -0
index 7951555e3f..dd011cdf1e 100755

tests/docker/common.rc build_qemu() · line 35

Quoted 7 lines
tests/docker/common.rc +3 -1
@@ -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 && prep_fail "Failed to run 'configure'")
+    make $MAKEFLAGS

If the configure failure is due to "this" patch, which it likely is, then prep_fail is wrong. We want test_fail instead.

Fam