github.com/wmydz1/docker@v1.6.2/hack/make/test-integration-cli (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  DEST=$1
     5  
     6  bundle_test_integration_cli() {
     7  	go_test_dir ./integration-cli
     8  }
     9  
    10  # subshell so that we can export PATH without breaking other things
    11  (
    12  	source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
    13  
    14  	# we need to wrap up everything in between integration-daemon-start and
    15  	# integration-daemon-stop to make sure we kill the daemon and don't hang,
    16  	# even and especially on test failures
    17  	didFail=
    18  	if ! {
    19  		source "$(dirname "$BASH_SOURCE")/.ensure-frozen-images"
    20  		source "$(dirname "$BASH_SOURCE")/.ensure-httpserver"
    21  		source "$(dirname "$BASH_SOURCE")/.ensure-emptyfs"
    22  
    23  		bundle_test_integration_cli
    24  	}; then
    25  		didFail=1
    26  	fi
    27  
    28  	source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop"
    29  
    30  	[ -z "$didFail" ] # "set -e" ftw
    31  ) 2>&1 | tee -a $DEST/test.log