aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
AgeCommit message (Collapse)AuthorFilesLines
2017-09-29docker: Don't mount ccache db if NOUSER=1Fam Zheng1-2/+4
With NOUSER=1 the container runs code as root, which may create privileged files that will not be be accssible next time. Skip ccache dir mount in this case. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170925075458.18047-1-famz@redhat.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2017-09-29docker: test-block: Don't continue if build failsFam Zheng1-1/+1
Report error and exit upon compiling error, otherwise the iotests output will be pure noise. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170926110134.2786-1-famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-29tests/docker/run: don't source /etc/profileAlex Bennée1-1/+0
The usual behaviour of /etc/profile is to set the default PATH for users. This runs into problems when we have updated PATH in our dockerfile e.g. to access a cross-compiler in a non-standard location. It shouldn't be needed anyway as we inherit the env from the image when it was setup. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> CC: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170926133622.14991-1-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-29docker: Fix test-mingwFam Zheng1-0/+3
Feature "dtc" is explicitly required by test-mingw, but is not detected by the run script since we switched to archive-source.sh in b7f404201e4. Since it isn't available in the Fedora image which runs this test on patchew, the way we get dtc is still from submodule. archive-source.sh takes care of bundling the submodule files already, so what we need to do is just checking if files are there. Makefile is chosen because it is one that is unlikely to get renamed in the future. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170925082913.22089-1-famz@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-29docker: add installation to build testsPaolo Bonzini14-4/+21
Basic test that "make install" works; this requires msgfmt so add gettext to the packages. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1506095371-23160-1-git-send-email-pbonzini@redhat.com> [Rebase to master. - Fam] Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: Drop 'set -e' from run scriptFam Zheng1-5/+3
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: Use archive-source.pyFam Zheng2-19/+3
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2017-09-22docker: Add test-blockFam Zheng1-0/+21
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905025614.579-6-famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Based-on: 20170905021201.25684-1-famz@redhat.com
2017-09-22docker: Add nettle-devel to fedora imageFam Zheng1-0/+1
The LUKS cases in qemu-iotests requires this. Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905025614.579-5-famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Based-on: 20170905021201.25684-1-famz@redhat.com
2017-09-22docker: Use unconfined security profileFam Zheng1-0/+1
Some by default blocked syscalls are required to run tests for example userfaultfd. Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905025614.579-4-famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Based-on: 20170905021201.25684-1-famz@redhat.com
2017-09-22docker: Add test_fail and prep_failFam Zheng1-0/+12
They both print a message and exit, but with different status code so distinguish real test errors from env preparation failures. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905025614.579-3-famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Based-on: 20170905021201.25684-1-famz@redhat.com
2017-09-22docker: Fix return code of build_qemu()Fam Zheng1-2/+1
Without "set -e", the "&&" makes sure that the return code reflects the result status, and that make only runs if configure succeeds. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170905025614.579-2-famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Based-on: 20170905021201.25684-1-famz@redhat.com
2017-09-22tests/docker: Clean up pathsFam Zheng2-5/+4
The 'run' script already creats src, build and install directories under $TEST_DIR, use it in common.rc. Also the tests always run from $QEMU_SRC/tests/docker, so use a relative $CMD string. Message-Id: <20170817035721.11064-1-famz@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: Enable features explicitly in test-fullFam Zheng1-6/+76
Also avoid "set -e". Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170907141245.31946-3-famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-09-22docker: Update ubuntu imageFam Zheng1-3/+8
Base on the newer ubuntu-lts (16.06) and include more packages for better build coverage. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170907141245.31946-2-famz@redhat.com>
2017-09-22docker: reduce noise when building travis.dockerAlex Bennée1-0/+3
Set the DEBIAN_FRONTEND and locale env vars to stop apt complaining so much as we build the image. Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20170725133425.436-7-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: don't install device-tree-compiler build-deps in travis.dockerAlex Bennée1-2/+1
Installing the device-tree-compiler build-deps is a little extreme. We only actually need the binary so include it with the other packages. Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20170725133425.436-6-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: docker.py make --no-cache skip checksum testAlex Bennée1-1/+2
If you invoke with NOCACHE=1 we pass --no-cache in the argv to docker.py but may still not force a rebuild if the dockerfile checksum hasn't changed. By testing for its presence we can force builds without having to manually remove the docker image. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20170725133425.436-5-alex.bennee@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22docker: ensure NOUSER for travis imagesAlex Bennée1-0/+1
While adding the current user is a useful default behaviour for creating new images it is not appropriate for Travis which already has a default user. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170725133425.436-2-alex.bennee@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-19docker: fix creation of archivesPaolo Bonzini1-1/+0
The pixman submodule does not exist anymore, and its removal broke docker-based tests. Fix it. Cc: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-30docker.py: Python 2.6 argparse compatibilityStefan Hajnoczi1-1/+3
Add the scripts/ directory to sys.path so Python 2.6 will be able to import argparse. Cc: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: John Snow <jsnow@redhat.com> Acked-by: Fam Zheng <famz@redhat.com> Message-id: 20170825155732.15665-3-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15docker: add centos7 imagePhilippe Mathieu-Daudé1-0/+31
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-5-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: install more packages on CentOS to extend code coveragePhilippe Mathieu-Daudé1-0/+10
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-4-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: add Xen libs to centos6 imagePhilippe Mathieu-Daudé1-1/+2
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-3-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: use one package per line in CentOS configPhilippe Mathieu-Daudé1-4/+14
This ease rebase/cherry-pick, also it is faster to visually find if a package is here. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-2-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-07-18docker: install clang since Shippable setup_ve() verify it is availablePhilippe Mathieu-Daudé1-0/+1
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: warn users to use newer debian8/debian9 base imagePhilippe Mathieu-Daudé2-0/+14
to stay backward incompatible. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian Ports base imagePhilippe Mathieu-Daudé1-0/+35
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add MXE (M cross environment) base image for MinGW-w64Philippe Mathieu-Daudé4-0/+85
see http://mxe.cc/ Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/mips64el imagePhilippe Mathieu-Daudé2-0/+31
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/mips[eb] imagesPhilippe Mathieu-Daudé3-4/+36
change image mips little -> big endian Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/powerpc based on JessieAlex Bennée2-0/+43
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [AJB: split from merged patch] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add 'apt-fake' script which generate fake debian packagesPhilippe Mathieu-Daudé1-0/+46
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add qemu:debian-jessie based on outdated jessie releasePhilippe Mathieu-Daudé1-0/+36
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: enable nettle to extend code coverage on arm64Philippe Mathieu-Daudé1-0/+3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: enable gcrypt to extend code coverage on amd64Philippe Mathieu-Daudé1-0/+3
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: enable netmap to extend code coverage on amd64Philippe Mathieu-Daudé1-0/+8
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: enable virgl to extend code coverage on amd64Philippe Mathieu-Daudé1-1/+11
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: mv, comments in dockerfile] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/amd64 based on StretchPhilippe Mathieu-Daudé2-0/+19
By itself this doesn't add much to our coverage. However later patches will extend this image to include more bleeding edge libraries which are not yet widely available in distros. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: extend commit msg] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/ppc64el based on StretchPhilippe Mathieu-Daudé2-0/+26
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debian/armel based on StretchPhilippe Mathieu-Daudé2-0/+25
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: optimize debian9 base imagePhilippe Mathieu-Daudé1-3/+4
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: remove packages now dependent of qemu in StretchPhilippe Mathieu-Daudé4-12/+0
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: debian/s390x no more in unstable, now available in StretchPhilippe Mathieu-Daudé2-10/+11
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add common packages to debian basePhilippe Mathieu-Daudé1-1/+4
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: rename debian stable -> 9 (Stretch)Philippe Mathieu-Daudé5-13/+18
We'll also want to support some older Debian combinations for architectures that didn't make the Debian 9 cut. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: extend commit msg] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: add debug tools to travis.dockerAlex Bennée1-1/+1
When a test fails/hangs you don't want the hassle of getting the debug tools installed. Lets install them on our image by default so we can debug when we need to. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: include python-yaml in travis.dockerAlex Bennée1-1/+1
Although the upstream Travis images don't need this library our "travis-lite" scripts are written in python. This allows us to do: make docker-travis@travis J=10 and approximate a travis run on their default image. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-18docker: allow customizing Travis global_env variablesPaolo Bonzini1-3/+3
This is useful so that we can do builds at higher than -j3 when running travis.py locally. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-07-17docker.py: Improve subprocess exit code handlingFam Zheng1-7/+12
A few error handlings are missing because we ignore the subprocess exit code, for example "docker build" errors are currently ignored. Introduce _do_check() aside the existing _do() method and use it in a few places. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170712075528.22770-3-famz@redhat.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>