aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-04-19 10:10:14 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-04-20 16:04:20 +0100
commit77162849a6313083d493171826978ff58a53240a (patch)
treeba0780ccd70964342c65a9fe2b8118e7152104fa /tests/docker
parent544f4a2578f0e8d0269383950499b2dc291f9fcf (diff)
tests/docker: remove SKIP_DOCKER_BUILD
It is now unused. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220401141326.1244422-17-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220419091020.3008144-20-alex.bennee@linaro.org>
Diffstat (limited to 'tests/docker')
-rw-r--r--tests/docker/Makefile.include12
-rwxr-xr-xtests/docker/docker.py57
2 files changed, 1 insertions, 68 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index eb100c294f..ca2157db46 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -33,15 +33,7 @@ $(DOCKER_SRC_COPY):
docker-qemu-src: $(DOCKER_SRC_COPY)
-# General rule for building docker images. If we are a sub-make
-# invoked with SKIP_DOCKER_BUILD we still check the image is up to date
-# though
-ifdef SKIP_DOCKER_BUILD
-docker-image-%: $(DOCKER_FILES_DIR)/%.docker
- $(call quiet-command, \
- $(DOCKER_SCRIPT) check --quiet qemu/$* $<, \
- "CHECK", "$*")
-else
+# General rule for building docker images.
docker-image-%: $(DOCKER_FILES_DIR)/%.docker
$(call quiet-command,\
$(DOCKER_SCRIPT) build -t qemu/$* -f $< \
@@ -77,8 +69,6 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
{ echo "You will need to build $(EXECUTABLE)"; exit 1;},\
"CHECK", "debian-$* exists"))
-endif
-
# Enforce dependencies for composite images
# we don't run tests on intermediate images (used as base by another image)
DOCKER_PARTIAL_IMAGES := debian10 debian11
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 78dd13171e..d0af2861b8 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -676,63 +676,6 @@ class CcCommand(SubCommand):
as_user=True)
-class CheckCommand(SubCommand):
- """Check if we need to re-build a docker image out of a dockerfile.
- Arguments: <tag> <dockerfile>"""
- name = "check"
-
- def args(self, parser):
- parser.add_argument("tag",
- help="Image Tag")
- parser.add_argument("dockerfile", default=None,
- help="Dockerfile name", nargs='?')
- parser.add_argument("--checktype", choices=["checksum", "age"],
- default="checksum", help="check type")
- parser.add_argument("--olderthan", default=60, type=int,
- help="number of minutes")
-
- def run(self, args, argv):
- tag = args.tag
-
- try:
- dkr = Docker()
- except subprocess.CalledProcessError:
- print("Docker not set up")
- return 1
-
- info = dkr.inspect_tag(tag)
- if info is None:
- print("Image does not exist")
- return 1
-
- if args.checktype == "checksum":
- if not args.dockerfile:
- print("Need a dockerfile for tag:%s" % (tag))
- return 1
-
- dockerfile = _read_dockerfile(args.dockerfile)
-
- if dkr.image_matches_dockerfile(tag, dockerfile):
- if not args.quiet:
- print("Image is up to date")
- return 0
- else:
- print("Image needs updating")
- return 1
- elif args.checktype == "age":
- timestr = dkr.get_image_creation_time(info).split(".")[0]
- created = datetime.strptime(timestr, "%Y-%m-%dT%H:%M:%S")
- past = datetime.now() - timedelta(minutes=args.olderthan)
- if created < past:
- print ("Image created @ %s more than %d minutes old" %
- (timestr, args.olderthan))
- return 1
- else:
- if not args.quiet:
- print ("Image less than %d minutes old" % (args.olderthan))
- return 0
-
-
def main():
global USE_ENGINE