Browse Source

Merge pull request #9674 from gyuho/test-script

*: use Go 1.10.2 and Go 1.9.6
Gyuho Lee 7 years ago
parent
commit
24e2af4289
5 changed files with 20 additions and 14 deletions
  1. 2 2
      .travis.yml
  2. 1 1
      CHANGELOG-3.4.md
  3. 4 4
      Makefile
  4. 12 6
      test
  5. 1 1
      tests/semaphore.test.bash

+ 2 - 2
.travis.yml

@@ -6,7 +6,7 @@ sudo: required
 services: docker
 services: docker
 
 
 go:
 go:
-- 1.10.1
+- 1.10.2
 - tip
 - tip
 
 
 notifications:
 notifications:
@@ -65,7 +65,7 @@ matrix:
     env: TARGET=linux-arm64-build
     env: TARGET=linux-arm64-build
   - go: tip
   - go: tip
     env: TARGET=linux-ppc64le-build
     env: TARGET=linux-ppc64le-build
-  - go: 1.10.1
+  - go: 1.10.2
     env: TARGET=linux-amd64-fmt-unit-go-tip
     env: TARGET=linux-amd64-fmt-unit-go-tip
 
 
 before_install:
 before_install:

+ 1 - 1
CHANGELOG-3.4.md

@@ -255,7 +255,7 @@ See [security doc](https://github.com/coreos/etcd/blob/master/Documentation/op-g
 ### Go
 ### Go
 
 
 - Require *Go 1.10+*.
 - Require *Go 1.10+*.
-- Compile with [*Go 1.10.1*](https://golang.org/doc/devel/release.html#go1.10).
+- Compile with [*Go 1.10.2*](https://golang.org/doc/devel/release.html#go1.10).
 
 
 ### Tooling
 ### Tooling
 
 

+ 4 - 4
Makefile

@@ -47,7 +47,7 @@ docker-remove:
 
 
 
 
 
 
-GO_VERSION ?= 1.10.1
+GO_VERSION ?= 1.10.2
 ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")
 ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")
 
 
 TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
 TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
@@ -62,16 +62,16 @@ endif
 
 
 # Example:
 # Example:
 #   GO_VERSION=1.8.7 make build-docker-test
 #   GO_VERSION=1.8.7 make build-docker-test
-#   GO_VERSION=1.9.5 make build-docker-test
+#   GO_VERSION=1.9.6 make build-docker-test
 #   make build-docker-test
 #   make build-docker-test
 #
 #
 #   gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
 #   gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
 #   GO_VERSION=1.8.7 make push-docker-test
 #   GO_VERSION=1.8.7 make push-docker-test
-#   GO_VERSION=1.9.5 make push-docker-test
+#   GO_VERSION=1.9.6 make push-docker-test
 #   make push-docker-test
 #   make push-docker-test
 #
 #
 #   gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
 #   gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
-#   GO_VERSION=1.9.5 make pull-docker-test
+#   GO_VERSION=1.9.6 make pull-docker-test
 #   make pull-docker-test
 #   make pull-docker-test
 
 
 build-docker-test:
 build-docker-test:

+ 12 - 6
test

@@ -82,8 +82,10 @@ fi
 
 
 # shellcheck disable=SC2206
 # shellcheck disable=SC2206
 FMT=($FMT)
 FMT=($FMT)
-# shellcheck disable=SC2128
-echo "Running with FMT:" "${FMT}"
+if [ "${VERBOSE}" == "1" ]; then
+	# shellcheck disable=SC2128
+	echo "Running with FMT:" "${FMT[@]}"
+fi
 
 
 # prepend REPO_PATH to each local package
 # prepend REPO_PATH to each local package
 split=$TEST
 split=$TEST
@@ -92,16 +94,20 @@ for a in $split; do TEST="$TEST ${REPO_PATH}/${a}"; done
 
 
 # shellcheck disable=SC2206
 # shellcheck disable=SC2206
 TEST=($TEST)
 TEST=($TEST)
-# shellcheck disable=SC2128
-echo "Running with TEST:" "${TEST}"
+if [ "${VERBOSE}" == "1" ]; then
+	# shellcheck disable=SC2128
+	echo "Running with TEST:" "${TEST[@]}"
+fi
 
 
 # TODO: 'client' pkg fails with gosimple from generated files
 # TODO: 'client' pkg fails with gosimple from generated files
 # TODO: 'rafttest' is failing with unused
 # TODO: 'rafttest' is failing with unused
 STATIC_ANALYSIS_PATHS=$(find . -name \*.go ! -path './vendor/*' ! -path './gopath.proto/*' ! -path '*pb/*' | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | grep -v 'client')
 STATIC_ANALYSIS_PATHS=$(find . -name \*.go ! -path './vendor/*' ! -path './gopath.proto/*' ! -path '*pb/*' | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | grep -v 'client')
 # shellcheck disable=SC2206
 # shellcheck disable=SC2206
 STATIC_ANALYSIS_PATHS=($STATIC_ANALYSIS_PATHS)
 STATIC_ANALYSIS_PATHS=($STATIC_ANALYSIS_PATHS)
-# shellcheck disable=SC2128
-echo "Running with STATIC_ANALYSIS_PATHS:" "${STATIC_ANALYSIS_PATHS}"
+if [ "${VERBOSE}" == "1" ]; then
+	# shellcheck disable=SC2128
+	echo "Running with STATIC_ANALYSIS_PATHS:" "${STATIC_ANALYSIS_PATHS[@]}"
+fi
 
 
 if [ -z "$GOARCH" ]; then
 if [ -z "$GOARCH" ]; then
 	GOARCH=$(go env GOARCH);
 	GOARCH=$(go env GOARCH);

+ 1 - 1
tests/semaphore.test.bash

@@ -15,7 +15,7 @@ fi
 docker run \
 docker run \
   --rm \
   --rm \
   --volume=`pwd`:/go/src/github.com/coreos/etcd \
   --volume=`pwd`:/go/src/github.com/coreos/etcd \
-  gcr.io/etcd-development/etcd-test:go1.10.1 \
+  gcr.io/etcd-development/etcd-test:go1.10.2 \
   /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log"
   /bin/bash -c "${TEST_OPTS} ./test 2>&1 | tee test-${TEST_SUFFIX}.log"
 
 
 ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log
 ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-${TEST_SUFFIX}.log