From 88a3bb74b346cd78b38fb2125f2a7bde28a458a8 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 5 Jun 2017 21:06:37 -0700 Subject: [PATCH] test, osutil: disable setting SIG_DFL on linux if built with cov tag Was causing etcd to terminate before finishing writing its coverage profile. --- pkg/osutil/signal.go | 2 +- pkg/osutil/signal_linux.go | 2 +- test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/osutil/signal.go b/pkg/osutil/signal.go index 8d956af4a..687397fdd 100644 --- a/pkg/osutil/signal.go +++ b/pkg/osutil/signal.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !linux +// +build !linux cov package osutil diff --git a/pkg/osutil/signal_linux.go b/pkg/osutil/signal_linux.go index 305861710..b94d80c58 100644 --- a/pkg/osutil/signal_linux.go +++ b/pkg/osutil/signal_linux.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build linux +// +build linux,!cov package osutil diff --git a/test b/test index c25a3d08f..80a62ffb2 100755 --- a/test +++ b/test @@ -377,7 +377,7 @@ function dep_pass { function build_cov_pass { out="bin" if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi - go test -c -covermode=set -coverpkg=$PKGS_COMMA -o ${out}/etcd_test + go test -tags cov -c -covermode=set -coverpkg=$PKGS_COMMA -o ${out}/etcd_test go test -tags cov -c -covermode=set -coverpkg=$PKGS_COMMA -o ${out}/etcdctl_test ${REPO_PATH}/etcdctl }