File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,20 @@ clean: ## clean up binaries
231231 @echo " $( WHALE) $@ "
232232 @rm -f $(BINARIES )
233233
234+ clean-test : # # clean up debris from previously failed tests
235+ @echo " $( WHALE) $@ "
236+ $(eval containers=$(shell find /run/containerd/runc -mindepth 2 -maxdepth 3 -type d -exec basename {} \;) )
237+ $(shell pidof containerd containerd-shim runc | xargs -r -n 1 kill -9)
238+ @ ( for container in $( containers) ; do \
239+ grep $$ container /proc/self/mountinfo | while read -r mountpoint; do \
240+ umount $$(echo $$mountpoint | awk '{print $$5}' ) ; \
241+ done ; \
242+ find /sys/fs/cgroup -name $$ container -print0 | xargs -r -0 rmdir; \
243+ done )
244+ @rm -rf /run/containerd/runc/*
245+ @rm -rf /run/containerd/fifo/*
246+ @rm -rf /run/containerd-test/*
247+
234248install : # # install binaries
235249 @echo " $( WHALE) $@ $( BINARIES) "
236250 @mkdir -p $(DESTDIR ) /bin
You can’t perform that action at this time.
0 commit comments