From 6cce28974b244cf26d8cc15385f526a03dc0983d Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Wed, 17 Apr 2024 20:48:15 +0100 Subject: [PATCH] tests/env.sh: Make VM cleanup faster Signed-off-by: Alberto Faria --- tests/env.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/env.sh b/tests/env.sh index fbcd1f4..c3ddcbf 100755 --- a/tests/env.sh +++ b/tests/env.sh @@ -395,6 +395,9 @@ run) full_script="\ set -o errexit -o pipefail -o nounset + ${engine_cmd[*]} ps --filter label=$label --format '{{.Names}}' | + xargs --no-run-if-empty ${engine_cmd[*]} stop --time 0 \ + >/dev/null 2>&1 ${engine_cmd[*]} ps --filter label=$label --format '{{.Names}}' --all | xargs --no-run-if-empty ${engine_cmd[*]} rm --force sudo rm -fr $label.temp $label.util