Failures from the integration suite were not propagating to the outter shell
for some reason. Handle the failure with an if exit 1.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
| ... | ... |
@@ -8,22 +8,32 @@ |
| 8 | 8 |
|
| 9 | 9 |
source "$SCRIPTDIR/make/.go-autogen" |
| 10 | 10 |
|
| 11 |
+# Set defaults |
|
| 11 | 12 |
: ${TEST_REPEAT:=1}
|
| 13 |
+: ${TESTFLAGS:=}
|
|
| 14 |
+: ${TESTDEBUG:=}
|
|
| 12 | 15 |
|
| 13 |
-integration_api_dirs=("$(
|
|
| 16 |
+integration_api_dirs=${TEST_INTEGRATION_DIR:-"$(
|
|
| 14 | 17 |
find ./integration -type d | |
| 15 |
- grep -vE '^(./integration$|./integration/util)')") |
|
| 18 |
+ grep -vE '^(./integration$|./integration/util)')"} |
|
| 16 | 19 |
|
| 17 | 20 |
run_test_integration() {
|
| 21 |
+ [[ "$TESTFLAGS" != *-check.f* ]] && run_test_integration_suites |
|
| 22 |
+ run_test_integration_legacy_suites |
|
| 23 |
+} |
|
| 24 |
+ |
|
| 25 |
+run_test_integration_suites() {
|
|
| 18 | 26 |
local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS"
|
| 19 | 27 |
for dir in $integration_api_dirs; do |
| 20 |
- ( |
|
| 28 |
+ if ! ( |
|
| 21 | 29 |
cd $dir |
| 22 | 30 |
echo "Running $PWD" |
| 23 | 31 |
test_env ./test.main $flags |
| 24 |
- ) |
|
| 32 |
+ ); then exit 1; fi |
|
| 25 | 33 |
done |
| 34 |
+} |
|
| 26 | 35 |
|
| 36 |
+run_test_integration_legacy_suites() {
|
|
| 27 | 37 |
( |
| 28 | 38 |
flags="-check.v -check.timeout=${TIMEOUT} -test.timeout=360m $TESTFLAGS"
|
| 29 | 39 |
cd integration-cli |
| ... | ... |
@@ -33,7 +43,7 @@ run_test_integration() {
|
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 | 35 |
build_test_suite_binaries() {
|
| 36 |
- if [ $DOCKER_INTEGRATION_TESTS_VERIFIED ]; then |
|
| 36 |
+ if [ ${DOCKER_INTEGRATION_TESTS_VERIFIED-} ]; then
|
|
| 37 | 37 |
echo "Skipping building test binaries; as DOCKER_INTEGRATION_TESTS_VERIFIED is set" |
| 38 | 38 |
return |
| 39 | 39 |
fi |