aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2017-07-25 14:34:23 +0100
committerFam Zheng <famz@redhat.com>2017-09-22 10:20:34 +0800
commit6fe3ae3f194a675a3b73b6beab3ed5dd35db3be3 (patch)
treef41ac820c78a3c8497374324710d47689eac34bb /tests/docker
parent1fddbf7c5eb4ed013b13705a5f5c08f1a0cdff66 (diff)
downloadqemu-6fe3ae3f194a675a3b73b6beab3ed5dd35db3be3.zip
qemu-6fe3ae3f194a675a3b73b6beab3ed5dd35db3be3.tar.gz
qemu-6fe3ae3f194a675a3b73b6beab3ed5dd35db3be3.tar.bz2
docker: docker.py make --no-cache skip checksum test
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>
Diffstat (limited to 'tests/docker')
-rwxr-xr-xtests/docker/docker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 81c87ee..08122ca 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -263,7 +263,8 @@ class BuildCommand(SubCommand):
tag = args.tag
dkr = Docker()
- if dkr.image_matches_dockerfile(tag, dockerfile):
+ if "--no-cache" not in argv and \
+ dkr.image_matches_dockerfile(tag, dockerfile):
if not args.quiet:
print "Image is up to date."
else: