瀏覽代碼

test, osutil: disable setting SIG_DFL on linux if built with cov tag

Was causing etcd to terminate before finishing writing its
coverage profile.
Anthony Romano 8 年之前
父節點
當前提交
88a3bb74b3
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      pkg/osutil/signal.go
  2. 1 1
      pkg/osutil/signal_linux.go
  3. 1 1
      test

+ 1 - 1
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
 

+ 1 - 1
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
 

+ 1 - 1
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
 }