e2e-run.sh 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. set -e
  3. TESTFLAGS=${TESTFLAGS:-""}
  4. # Currently only DockerSuite and DockerNetworkSuite have been adapted for E2E testing
  5. TESTFLAGS_LEGACY=${TESTFLAGS_LEGACY:-""}
  6. TIMEOUT=${TIMEOUT:-60m}
  7. SCRIPTDIR="$(dirname ${BASH_SOURCE[0]})"
  8. export DOCKER_ENGINE_GOARCH=${DOCKER_ENGINE_GOARCH:-amd64}
  9. run_test_integration() {
  10. run_test_integration_suites
  11. run_test_integration_legacy_suites
  12. }
  13. run_test_integration_suites() {
  14. local flags="-test.timeout=${TIMEOUT} $TESTFLAGS"
  15. for dir in /tests/integration/*; do
  16. if ! (
  17. cd $dir
  18. echo "Running $PWD"
  19. ./test.main $flags
  20. ); then exit 1; fi
  21. done
  22. }
  23. run_test_integration_legacy_suites() {
  24. (
  25. flags="-check.timeout=${TIMEOUT} -test.timeout=360m $TESTFLAGS_LEGACY"
  26. cd /tests/integration-cli
  27. echo "Running $PWD"
  28. ./test.main $flags
  29. )
  30. }
  31. bash $SCRIPTDIR/ensure-emptyfs.sh
  32. echo "Run integration tests"
  33. run_test_integration