github.com/lazyboychen7/engine@v17.12.1-ce-rc2+incompatible/hack/test/e2e-run.sh (about)

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