test-integration-cli 649 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. set -e
  3. source hack/make/.integration-test-helpers
  4. # subshell so that we can export PATH without breaking other things
  5. (
  6. bundle .integration-daemon-start
  7. bundle .integration-daemon-setup
  8. bundle_test_integration_cli
  9. bundle .integration-daemon-stop
  10. if [ "$(go env GOOS)" != 'windows' ]
  11. then
  12. leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }')
  13. if [ -n "$leftovers" ]
  14. then
  15. ps aux
  16. kill -9 $leftovers 2> /dev/null
  17. echo "!!!! WARNING you have left over shim(s), Cleanup your test !!!!"
  18. exit 1
  19. fi
  20. fi
  21. ) 2>&1 | tee -a "$DEST/test.log"