Skip to contentSkip to conversation

Small tests/docker fixes

PATCH In review Paolo Bonzini 2 participants 9 messages Jun 6, 2016 – Jun 7, 2016

lore
Share & tools
lore
#0 lore raw

cover Small tests/docker fixes

Small fixes, some of them being very close to personal preference.

Thanks,

Paolo

Paolo Bonzini (6):
tests/docker: fix make-archive-maybe tests/docker: make test-full build all targets, not none tests/docker: fix test-mingw
tests/docker: remove unused feature "ccache" tests/docker: support travis test with fedora image tests/docker: build all targets in test-clang

 tests/docker/Makefile.include          | 6 +++---
 tests/docker/common.rc                 | 2 +-
 tests/docker/dockerfiles/fedora.docker | 4 ++--
 tests/docker/dockerfiles/ubuntu.docker | 4 ++--
 tests/docker/test-clang                | 2 --
 5 files changed, 8 insertions(+), 10 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/6 tests/docker: fix make-archive-maybe

make-archive-maybe expects an archive path relative
to $1, but receives a path relative to the current directory. Redirect the output outside the subshell to bypass the "cd $1".

---
 tests/docker/Makefile.include | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/docker/Makefile.include +3 -3
index 2fd2ca3..d0ad36c 100644
@@ -21,10 +21,10 @@ IMAGES ?= %
 make-archive-maybe = $(if $(wildcard $1/*), \
 	$(call quiet-command, \
 		(cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \
-			git archive -1 HEAD --format=tar.gz -o $2; \
+			git archive -1 HEAD --format=tar.gz; \
 		else \
-			git archive -1 $$(git stash create) --format=tar.gz -o $2; \
-		fi), \
+			git archive -1 $$(git stash create) --format=tar.gz; \
+		fi) > $2, \
 		"  ARCHIVE $(notdir $2)"))
 
 CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
Signature · 1 line
1.8.3.1
#2 lore raw

Re: [Qemu-devel] [PATCH 1/6] tests/docker: fix make-archive-maybe

Quoted 31 lines · Paolo Bonzini

make-archive-maybe expects an archive path relative
to $1, but receives a path relative to the current directory. Redirect the output outside the subshell to bypass the "cd $1".

---
 tests/docker/Makefile.include | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/docker/Makefile.include +3 -3
index 2fd2ca3..d0ad36c 100644
@@ -21,10 +21,10 @@ IMAGES ?= %
 make-archive-maybe = $(if $(wildcard $1/*), \
 	$(call quiet-command, \
 		(cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \
-			git archive -1 HEAD --format=tar.gz -o $2; \
+			git archive -1 HEAD --format=tar.gz; \
 		else \
-			git archive -1 $$(git stash create) --format=tar.gz -o $2; \
-		fi), \
+			git archive -1 $$(git stash create) --format=tar.gz; \
+		fi) > $2, \
 		"  ARCHIVE $(notdir $2)"))
 
 CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
Signature · 1 line
1.8.3.1

I think this is better than my patch because it also reduces the duplication between the two "git archive" commands a little. So I'm dropping mine.

Fam

#3 lore raw

PATCH 2/6 tests/docker: make test-full build all targets, not none

In reply to Paolo Bonzini

Fix common.rc to avoid passing an empty --target-list= option to configure.

---
 tests/docker/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/common.rc +1 -1
index c493eeb..77069e1 100755
@@ -24,7 +24,7 @@ requires()
 build_qemu()
 {
     $QEMU_SRC/configure \
-        --target-list="${TARGET_LIST}" \
+        ${TARGET_LIST:+"--target-list=${TARGET_LIST}"} \
         --prefix="$PWD/install" \
         $EXTRA_CONFIGURE_OPTS \
         "$@"
Signature · 1 line
1.8.3.1
#4 lore raw

PATCH 3/6 tests/docker: fix test-mingw

In reply to Paolo Bonzini

Add flex and bison for use in test-mingw, because test-mingw uses the in-tree libdtc.

---
 tests/docker/dockerfiles/fedora.docker | 2 +-
 tests/docker/dockerfiles/ubuntu.docker | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/fedora.docker +1 -1
index 6251e45..76acff3 100644
@@ -1,6 +1,6 @@
 FROM fedora:23
 RUN dnf install -y \
-    ccache git tar \
+    ccache git tar flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
     gcc gcc-c++ clang make perl which bc findutils \
     mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
tests/docker/dockerfiles/ubuntu.docker +1 -1
index 725a7ca..44ecc12 100644
@@ -2,7 +2,7 @@ FROM ubuntu:14.04
 RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \
     /etc/apt/sources.list
 RUN apt-get update
-RUN apt-get -y install \
+RUN apt-get -y install flex bison \
     libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev \
     libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
     libspice-protocol-dev libnss3-dev libfdt-dev \
Signature · 1 line
1.8.3.1
#5 lore raw

PATCH 4/6 tests/docker: remove unused feature "ccache"

In reply to Paolo Bonzini
---
 tests/docker/dockerfiles/ubuntu.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/ubuntu.docker +1 -1
index 44ecc12..a8b88c3 100644
@@ -8,4 +8,4 @@ RUN apt-get -y install flex bison \
     libspice-protocol-dev libnss3-dev libfdt-dev \
     libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
     git make ccache python-yaml gcc clang sparse
-ENV FEATURES clang ccache pyyaml
+ENV FEATURES clang pyyaml
Signature · 1 line
1.8.3.1
#6 lore raw

PATCH 5/6 tests/docker: support travis test with fedora image

In reply to Paolo Bonzini

Install sparse and PyYAML.

---
 tests/docker/dockerfiles/fedora.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/fedora.docker +2 -2
index 76acff3..1d26a8e 100644
@@ -1,7 +1,7 @@
 FROM fedora:23
 RUN dnf install -y \
-    ccache git tar flex bison \
+    ccache git tar PyYAML sparse flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
     gcc gcc-c++ clang make perl which bc findutils \
     mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
-ENV FEATURES mingw clang
+ENV FEATURES mingw clang pyyaml
Signature · 1 line
1.8.3.1
#7 lore raw

PATCH 6/6 tests/docker: build all targets in test-clang

In reply to Paolo Bonzini

Warnings specific to clang may affect devices that are not build by x86_64-softmmu and aarch64-softmmu. Build all targets since that is also what Peter does.

---
 tests/docker/test-clang | 2 --
 1 file changed, 2 deletions(-)
tests/docker/test-clang +0 -2
index 6745dbe..60e4e97 100755
@@ -20,7 +20,5 @@ OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang"
 # See also: https://bugzilla.redhat.com/show_bug.cgi?id=1263834
 #OPTS="$OPTS --extra-cflags=-fsanitize=undefined \
     #--extra-cflags=-fno-sanitize=float-divide-by-zero"
-DEF_TARGET_LIST="$(echo {x86_64,aarch64}-softmmu)"
-TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu $OPTS
 make $MAKEFLAGS check
Signature · 1 line
1.8.3.1