From 66e907390950f3a9cae1a8a33cf12b37a6058cf7 Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Wed, 16 Dec 2015 12:37:42 -0700 Subject: [PATCH] make tip container usable for any git revision, add go1.6beta1 test --- ...ild_ubuntu64_tip => Dockerfile_build_ubuntu64_git | 5 +++-- tip.sh => gobuild.sh | 8 ++++++-- test.sh | 12 ++++++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) rename Dockerfile_build_ubuntu64_tip => Dockerfile_build_ubuntu64_git (91%) rename tip.sh => gobuild.sh (50%) diff --git a/Dockerfile_build_ubuntu64_tip b/Dockerfile_build_ubuntu64_git similarity index 91% rename from Dockerfile_build_ubuntu64_tip rename to Dockerfile_build_ubuntu64_git index 77887ff296..6dc9eadf48 100644 --- a/Dockerfile_build_ubuntu64_tip +++ b/Dockerfile_build_ubuntu64_git @@ -38,5 +38,6 @@ RUN git clone https://go.googlesource.com/go ENV PATH /go/bin:$PATH # Add script for compiling go -ADD ./tip.sh /tip.sh -ENTRYPOINT [ "/tip.sh" ] +ENV GO_CHECKOUT master +ADD ./gobuild.sh /gobuild.sh +ENTRYPOINT [ "/gobuild.sh" ] diff --git a/tip.sh b/gobuild.sh similarity index 50% rename from tip.sh rename to gobuild.sh index d0465597e4..9a96e7e9b7 100755 --- a/tip.sh +++ b/gobuild.sh @@ -1,12 +1,16 @@ #!/bin/bash -# This script run inside the Dockerfile_build_ubuntu64_tip container and +# This script run inside the Dockerfile_build_ubuntu64_git container and # gets the latests Go source code and compiles it. # Then passes control over to the normal build.py script set -e cd /go/src -git pull +git fetch --all +git checkout $GO_CHECKOUT +# Merge in recent changes if we are on a branch +# if we checked out a tag just ignore the error +git pull || true ./make.bash # Run normal build.py diff --git a/test.sh b/test.sh index a67fc919e4..b228050a18 100755 --- a/test.sh +++ b/test.sh @@ -10,6 +10,7 @@ # 2: race enabled 64bit tests # 3: normal 32bit tests # 4: normal 64bit tests against Go tip +# 5: normal 64bit tests against Go 1.6beta1 # save: build the docker images and save them to DOCKER_SAVE_DIR. Do not run tests. # count: print the number of test environments # *: to run all tests in parallel containers @@ -32,7 +33,7 @@ PARALLELISM=${PARALLELISM-1} TIMEOUT=${TIMEOUT-480s} # Update this value if you add a new test environment. -ENV_COUNT=5 +ENV_COUNT=6 # Default return code 0 rc=0 @@ -72,6 +73,7 @@ function run_test_docker { -v "$DIR:/root/go/src/github.com/influxdb/influxdb" \ -e "INFLUXDB_DATA_ENGINE=$INFLUXDB_DATA_ENGINE" \ -e "GORACE=$GORACE" \ + -e "GO_CHECKOUT=$GO_CHECKOUT" \ "$imagename" \ "--parallel=$PARALLELISM" \ "--timeout=$TIMEOUT" \ @@ -149,7 +151,13 @@ case $ENVIRONMENT_INDEX in ;; 4) # 64 bit tests on golang tip - run_test_docker Dockerfile_build_ubuntu64_tip test_64bit_gotip --test --no-vet + run_test_docker Dockerfile_build_ubuntu64_git test_64bit_gotip --test --no-vet + rc=$? + ;; + 5) + # 64 bit tests on golang go1.6 + GO_CHECKOUT=go1.6beta1 + run_test_docker Dockerfile_build_ubuntu64_git test_64bit_go1.6 --test --no-vet rc=$? ;; "save")