aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-03 12:43:03 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-10-03 12:43:03 +0100
commitbe9d199751789fdc96a3febe3f0768f1338d87ca (patch)
tree171e1c4d8583033ec3d9745f7f405a51f44f259a
parentab161529261928ae7f3556e3220829c34b2686ec (diff)
parent36ac78e65a0695f0e397865cceaf4ab5c4e52c64 (diff)
Merge remote-tracking branch 'remotes/famz/tags/docker-testing-pull-request' into staging
# gpg: Signature made Fri 29 Sep 2017 04:17:37 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/docker-testing-pull-request: docker: Don't mount ccache db if NOUSER=1 docker: test-block: Don't continue if build fails tests/docker/run: don't source /etc/profile docker: Fix test-mingw docker: add installation to build tests Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--tests/docker/Makefile.include6
-rwxr-xr-xtests/docker/common.rc8
-rw-r--r--tests/docker/dockerfiles/centos6.docker1
-rw-r--r--tests/docker/dockerfiles/centos7.docker1
-rw-r--r--tests/docker/dockerfiles/debian-ports.docker1
-rw-r--r--tests/docker/dockerfiles/debian8.docker1
-rw-r--r--tests/docker/dockerfiles/debian9.docker1
-rw-r--r--tests/docker/dockerfiles/fedora.docker2
-rw-r--r--tests/docker/dockerfiles/min-glib.docker2
-rw-r--r--tests/docker/dockerfiles/ubuntu.docker2
-rwxr-xr-xtests/docker/run4
-rwxr-xr-xtests/docker/test-block2
-rwxr-xr-xtests/docker/test-build1
-rwxr-xr-xtests/docker/test-clang1
-rwxr-xr-xtests/docker/test-full2
-rwxr-xr-xtests/docker/test-mingw1
-rwxr-xr-xtests/docker/test-quick1
17 files changed, 29 insertions, 8 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 0e4f159619..6f9ea196a7 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -143,9 +143,11 @@ docker-run: docker-qemu-src
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
-e V=$V -e J=$J -e DEBUG=$(DEBUG) \
-e SHOW_ENV=$(SHOW_ENV) \
- -e CCACHE_DIR=/var/tmp/ccache \
+ $(if $(NOUSER),, \
+ -e CCACHE_DIR=/var/tmp/ccache \
+ -v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
+ ) \
-v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
- -v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
$(IMAGE) \
/var/tmp/qemu/run \
$(TEST), " RUN $(TEST) in ${IMAGE}")
diff --git a/tests/docker/common.rc b/tests/docker/common.rc
index 87f5263757..7951555e3f 100755
--- a/tests/docker/common.rc
+++ b/tests/docker/common.rc
@@ -44,3 +44,11 @@ prep_fail()
echo "$@"
exit 2
}
+
+install_qemu()
+{
+ make install $MAKEFLAGS DESTDIR=$PWD/=destdir
+ ret=$?
+ rm -rf $PWD/=destdir
+ return $ret
+}
diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker
index f6aae13f29..ad24319582 100644
--- a/tests/docker/dockerfiles/centos6.docker
+++ b/tests/docker/dockerfiles/centos6.docker
@@ -8,6 +8,7 @@ ENV PACKAGES \
flex \
g++ \
gcc \
+ gettext \
git \
glib2-devel \
libepoxy-devel \
diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker
index 0b59aa2f26..575de29a0a 100644
--- a/tests/docker/dockerfiles/centos7.docker
+++ b/tests/docker/dockerfiles/centos7.docker
@@ -9,6 +9,7 @@ ENV PACKAGES \
flex \
g++ \
gcc \
+ gettext \
git \
glib2-devel \
libepoxy-devel \
diff --git a/tests/docker/dockerfiles/debian-ports.docker b/tests/docker/dockerfiles/debian-ports.docker
index fba224f760..e05a9a9802 100644
--- a/tests/docker/dockerfiles/debian-ports.docker
+++ b/tests/docker/dockerfiles/debian-ports.docker
@@ -27,6 +27,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
clang \
debian-ports-archive-keyring \
flex \
+ gettext \
git \
pkg-config \
psmisc \
diff --git a/tests/docker/dockerfiles/debian8.docker b/tests/docker/dockerfiles/debian8.docker
index 3d09b4b462..1bcf2e3d2f 100644
--- a/tests/docker/dockerfiles/debian8.docker
+++ b/tests/docker/dockerfiles/debian8.docker
@@ -26,6 +26,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
clang \
curl \
flex \
+ gettext \
git \
gnupg \
pkg-config \
diff --git a/tests/docker/dockerfiles/debian9.docker b/tests/docker/dockerfiles/debian9.docker
index a4509950e6..154ae2a455 100644
--- a/tests/docker/dockerfiles/debian9.docker
+++ b/tests/docker/dockerfiles/debian9.docker
@@ -22,6 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
ca-certificates \
clang \
flex \
+ gettext \
git \
pkg-config \
psmisc \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 27e8201c54..4b26c3aded 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -1,6 +1,6 @@
FROM fedora:latest
ENV PACKAGES \
- ccache git tar PyYAML sparse flex bison python2 bzip2 hostname \
+ ccache gettext git tar PyYAML sparse flex bison python2 bzip2 hostname \
glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
gcc gcc-c++ clang make perl which bc findutils libaio-devel \
nettle-devel \
diff --git a/tests/docker/dockerfiles/min-glib.docker b/tests/docker/dockerfiles/min-glib.docker
index 9f542d5e9c..f2eed97d35 100644
--- a/tests/docker/dockerfiles/min-glib.docker
+++ b/tests/docker/dockerfiles/min-glib.docker
@@ -1,6 +1,6 @@
FROM centos:6
RUN yum install -y \
- tar git make gcc g++ \
+ tar gettext git make gcc g++ \
zlib-devel SDL-devel pixman-devel \
epel-release
RUN yum install -y libfdt-devel ccache
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
index d73ce02246..dabbf2a8a4 100644
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -12,7 +12,7 @@ ENV PACKAGES flex bison \
libbluetooth-dev librbd-dev libaio-dev glusterfs-common libnuma-dev libepoxy-dev libdrm-dev libgbm-dev \
libjemalloc-dev libcacard-dev libusbredirhost-dev libnfs-dev libcap-dev libattr1-dev \
texinfo \
- git make ccache python-yaml gcc clang sparse
+ gettext git make ccache python-yaml gcc clang sparse
RUN apt-get -y install $PACKAGES
RUN dpkg -l $PACKAGES | sort > /packages.txt
ENV FEATURES clang pyyaml
diff --git a/tests/docker/run b/tests/docker/run
index c8f940de15..642084bcb8 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -18,7 +18,6 @@ fi
BASE="$(dirname $(readlink -e $0))"
# Prepare the environment
-. /etc/profile
export PATH=/usr/lib/ccache:$PATH
if test -n "$J"; then
@@ -31,6 +30,9 @@ mkdir -p $TEST_DIR/{src,build,install}
# Extract the source tarballs
tar -C $TEST_DIR/src -xf $BASE/qemu.tar || prep_fail "Failed to untar source"
+if test -f $TEST_DIR/src/Makefile; then
+ export FEATURES="$FEATURES dtc"
+fi
if test -n "$SHOW_ENV"; then
if test -f /packages.txt; then
diff --git a/tests/docker/test-block b/tests/docker/test-block
index 2ca1ce54f6..5624b81827 100755
--- a/tests/docker/test-block
+++ b/tests/docker/test-block
@@ -14,7 +14,7 @@
cd "$BUILD_DIR"
-build_qemu --target-list=x86_64-softmmu
+build_qemu --target-list=x86_64-softmmu || test_fail "Build failed"
cd tests/qemu-iotests
for t in raw qcow2 nbd luks; do
./check -g quick -$t || test_fail "Test failed: iotests $t"
diff --git a/tests/docker/test-build b/tests/docker/test-build
index 031a7d9d30..22766cfacc 100755
--- a/tests/docker/test-build
+++ b/tests/docker/test-build
@@ -18,3 +18,4 @@ cd "$BUILD_DIR"
DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
build_qemu
+install_qemu
diff --git a/tests/docker/test-clang b/tests/docker/test-clang
index 16485e6b7e..1eb61a3af7 100755
--- a/tests/docker/test-clang
+++ b/tests/docker/test-clang
@@ -24,3 +24,4 @@ OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang"
#--extra-cflags=-fno-sanitize=float-divide-by-zero"
build_qemu $OPTS
make $MAKEFLAGS check
+install_qemu
diff --git a/tests/docker/test-full b/tests/docker/test-full
index d71bf9d275..816d5a3eec 100755
--- a/tests/docker/test-full
+++ b/tests/docker/test-full
@@ -86,4 +86,4 @@ build_qemu \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
--enable-xfsctl \
-&& make check $MAKEFLAGS
+&& make check $MAKEFLAGS && install_qemu
diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw
index 2adadcb58d..39a1da448e 100755
--- a/tests/docker/test-mingw
+++ b/tests/docker/test-mingw
@@ -31,6 +31,7 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
--enable-guest-agent \
--with-sdlabi=1.2 \
--with-gtkabi=2.0
+ install_qemu
make clean
done
diff --git a/tests/docker/test-quick b/tests/docker/test-quick
index c465dc06d8..3b7bce6105 100755
--- a/tests/docker/test-quick
+++ b/tests/docker/test-quick
@@ -19,3 +19,4 @@ DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
build_qemu
make check $MAKEFLAGS
+install_qemu