From 328643532ee3c60c099171d4ce2cad0ca0354ca9 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 16 Nov 2017 11:19:09 +0100 Subject: [PATCH] unix: fix test compilation error on Go 1.7 testing.Run was introduced in Go 1.7. Skip the tests using it if built with Go 1.6 or below. Change-Id: I24c81426ea6d3eaaca5a565ad79b62b30e645d04 Reviewed-on: https://go-review.googlesource.com/78255 Reviewed-by: Ian Lance Taylor --- unix/dev_darwin_test.go | 2 ++ unix/dev_dragonfly_test.go | 2 ++ unix/dev_linux_test.go | 2 ++ unix/dev_netbsd_test.go | 2 ++ unix/dev_openbsd_test.go | 2 ++ unix/dev_solaris_test.go | 2 ++ 6 files changed, 12 insertions(+) diff --git a/unix/dev_darwin_test.go b/unix/dev_darwin_test.go index 48d04486..bf1adf3a 100644 --- a/unix/dev_darwin_test.go +++ b/unix/dev_darwin_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/unix/dev_dragonfly_test.go b/unix/dev_dragonfly_test.go index 2caba08a..9add3766 100644 --- a/unix/dev_dragonfly_test.go +++ b/unix/dev_dragonfly_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/unix/dev_linux_test.go b/unix/dev_linux_test.go index 6e001f37..2fd3eadd 100644 --- a/unix/dev_linux_test.go +++ b/unix/dev_linux_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/unix/dev_netbsd_test.go b/unix/dev_netbsd_test.go index c39a80a4..24a7e171 100644 --- a/unix/dev_netbsd_test.go +++ b/unix/dev_netbsd_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/unix/dev_openbsd_test.go b/unix/dev_openbsd_test.go index 5635d271..e6cb64ff 100644 --- a/unix/dev_openbsd_test.go +++ b/unix/dev_openbsd_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/unix/dev_solaris_test.go b/unix/dev_solaris_test.go index db58c0d0..656508c9 100644 --- a/unix/dev_solaris_test.go +++ b/unix/dev_solaris_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import (