diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-09-17 12:44:41 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-09-18 10:44:47 +0100 |
commit | 17cd6e2bbffa740ee44b9b651e70d56175c17e03 (patch) | |
tree | e621b8a6435da331efbcf2227e53eed3a27d808c | |
parent | a6a0c8394c5b0ce4cee2a1597d235d9b2b9af3c2 (diff) | |
download | qemu-17cd6e2bbffa740ee44b9b651e70d56175c17e03.zip qemu-17cd6e2bbffa740ee44b9b651e70d56175c17e03.tar.gz qemu-17cd6e2bbffa740ee44b9b651e70d56175c17e03.tar.bz2 |
docker.py: always use --rm
Avoid that containers pile up.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | tests/docker/Makefile.include | 1 | ||||
-rwxr-xr-x | tests/docker/docker.py | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 3daabaa..7570426 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -243,7 +243,6 @@ docker-run: docker-qemu-src $(DOCKER_SCRIPT) run \ $(if $(NOUSER),,--run-as-current-user) \ --security-opt seccomp=unconfined \ - $(if $V,,--rm) \ $(if $(DEBUG),-ti,) \ $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \ -e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \ diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 356d761..36b7868 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -377,7 +377,7 @@ class Docker(object): if self._command[0] == "podman": cmd.insert(0, '--userns=keep-id') - ret = self._do_check(["run", "--label", + ret = self._do_check(["run", "--rm", "--label", "com.qemu.instance.uuid=" + label] + cmd, quiet=quiet) if not keep: @@ -616,7 +616,7 @@ class CcCommand(SubCommand): if argv and argv[0] == "--": argv = argv[1:] cwd = os.getcwd() - cmd = ["--rm", "-w", cwd, + cmd = ["-w", cwd, "-v", "%s:%s:rw" % (cwd, cwd)] if args.paths: for p in args.paths: |