Skip to content

Commit

Permalink
Prevent CI from getting stuck if shims are left alive
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mlaventure committed Jun 28, 2016
1 parent 83e6197 commit fd1129d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hack/make/test-integration-cli
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,17 @@ bundle_test_integration_cli() {
bundle_test_integration_cli

bundle .integration-daemon-stop

if [ "$(go env GOOS)" != 'windows' ]
then
leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }')
if [ -n "$leftovers" ]
then
ps aux
kill -9 $leftovers 2> /dev/null
echo "!!!! WARNING you have left over shim(s), Cleanup your test !!!!"
exit 1
fi
fi

) 2>&1 | tee -a "$DEST/test.log"

0 comments on commit fd1129d

Please sign in to comment.