Skip to content

Commit fd1129d

Browse files
committed
Prevent CI from getting stuck if shims are left alive
This will kill any left over containerd-shims to avoid the integration script to stay stuck while it waits on them. It will then causes CI to fail (even if all the tests succeeded). Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
1 parent 83e6197 commit fd1129d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hack/make/test-integration-cli

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,17 @@ bundle_test_integration_cli() {
1515
bundle_test_integration_cli
1616

1717
bundle .integration-daemon-stop
18+
19+
if [ "$(go env GOOS)" != 'windows' ]
20+
then
21+
leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }')
22+
if [ -n "$leftovers" ]
23+
then
24+
ps aux
25+
kill -9 $leftovers 2> /dev/null
26+
echo "!!!! WARNING you have left over shim(s), Cleanup your test !!!!"
27+
exit 1
28+
fi
29+
fi
30+
1831
) 2>&1 | tee -a "$DEST/test.log"

0 commit comments

Comments
 (0)