2017-09-08 10:43:04 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2017-09-14 13:17:49 -04:00
|
|
|
TESTFLAGS=${TESTFLAGS:-""}
|
|
|
|
# Currently only DockerSuite and DockerNetworkSuite have been adapted for E2E testing
|
|
|
|
TESTFLAGS_LEGACY=${TESTFLAGS_LEGACY:-""}
|
|
|
|
TIMEOUT=${TIMEOUT:-60m}
|
|
|
|
|
|
|
|
SCRIPTDIR="$(dirname ${BASH_SOURCE[0]})"
|
|
|
|
|
2017-09-12 08:53:20 -04:00
|
|
|
export DOCKER_ENGINE_GOARCH=${DOCKER_ENGINE_GOARCH:-amd64}
|
|
|
|
|
2017-09-14 13:17:49 -04:00
|
|
|
run_test_integration() {
|
|
|
|
run_test_integration_suites
|
|
|
|
run_test_integration_legacy_suites
|
|
|
|
}
|
|
|
|
|
|
|
|
run_test_integration_suites() {
|
2017-10-13 07:40:21 -04:00
|
|
|
local flags="-test.timeout=${TIMEOUT} $TESTFLAGS"
|
2017-09-14 13:17:49 -04:00
|
|
|
for dir in /tests/integration/*; do
|
|
|
|
if ! (
|
|
|
|
cd $dir
|
|
|
|
echo "Running $PWD"
|
|
|
|
./test.main $flags
|
|
|
|
); then exit 1; fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
run_test_integration_legacy_suites() {
|
|
|
|
(
|
2017-10-13 07:40:21 -04:00
|
|
|
flags="-check.timeout=${TIMEOUT} -test.timeout=360m $TESTFLAGS_LEGACY"
|
2017-09-14 13:17:49 -04:00
|
|
|
cd /tests/integration-cli
|
|
|
|
echo "Running $PWD"
|
|
|
|
./test.main $flags
|
|
|
|
)
|
|
|
|
}
|
2017-09-08 10:43:04 -04:00
|
|
|
|
2017-09-14 13:17:49 -04:00
|
|
|
bash $SCRIPTDIR/ensure-emptyfs.sh
|
2017-09-08 10:43:04 -04:00
|
|
|
|
2017-09-14 13:17:49 -04:00
|
|
|
echo "Run integration tests"
|
|
|
|
run_test_integration
|