Skip to content

Commit

Permalink
test: add cleanup script
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Mar 1, 2024
1 parent da082d8 commit 4022877
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

SELF=$(dirname "$(readlink -f "$0")")
. "$SELF/oslist.sh"

set -euxo pipefail

# Images
rm -rfv "$IMAGES"
# Incus-Images
for img in $(incus image list -f csv -c l | grep "^unify-test"); do
incus image delete "$img"
done
# Test-Containers
for cont in $(incus ls -f csv -c n | grep "^unify-[0-9]*-test"); do
incus delete -f "$cont"
done
# Dev-Containers
for cont in $(incus ls -f csv -c n | grep "^unify-"); do
incus delete -f "$cont"
done

0 comments on commit 4022877

Please sign in to comment.