From f50af455fa52ac00873e67825b63a5ce5ab80392 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 4 May 2015 14:00:05 -0700 Subject: [PATCH] integration tests: Don't build binaries anymore, it's too slow. Signed-off-by: Andrea Luzzardi --- test/integration/helpers.bash | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/integration/helpers.bash b/test/integration/helpers.bash index 3a65a4b13a..32d133d93b 100644 --- a/test/integration/helpers.bash +++ b/test/integration/helpers.bash @@ -4,7 +4,7 @@ SWARM_ROOT=${SWARM_ROOT:-${BATS_TEST_DIRNAME}/../..} # Path of the Swarm binary. -SWARM_BINARY=`mktemp` +SWARM_BINARY=${SWARM_BINARY:-${SWARM_ROOT}/swarm} # Docker image and version to use for integration tests. DOCKER_IMAGE=${DOCKER_IMAGE:-dockerswarm/dind} @@ -27,16 +27,10 @@ function join() { echo "$*" } -# Build the Swarm binary (if not already built) -function build_swarm() { - [ -x $SWARM_BINARY ] || (rm -f $SWARM_BINARY && cd $SWARM_ROOT && godep go build -o $SWARM_BINARY) -} - # Run the swarm binary. You must NOT fork this command (swarm foo &) as the PID # ($!) will be the one of the subshell instead of swarm and you won't be able # to kill it. function swarm() { - build_swarm "$SWARM_BINARY" "$@" } @@ -67,8 +61,6 @@ function wait_until_reachable() { # Start the swarm manager in background. function swarm_manage() { - build_swarm - local discovery if [ $# -eq 0 ]; then discovery=`join , ${HOSTS[@]}` @@ -83,8 +75,6 @@ function swarm_manage() { # Start swarm join for every engine with the discovery as parameter function swarm_join() { - build_swarm - local i=0 for h in ${HOSTS[@]}; do echo "Swarm join #${i}: $h $@"