tstest/integration/vms: move build tags from linux to !windows

The tests build fine on other Unix's, they just can't run there.
But there is already a t.Skip by default, so `go test` ends up
working fine elsewhere and checks the code compiles.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
David Crawshaw 2021-08-31 16:36:01 -07:00 committed by David Crawshaw
parent 7f29dcaac1
commit f53792026e
9 changed files with 17 additions and 23 deletions

View File

@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux
// +build linux
package vms package vms
import ( import (
"io" "io"
"runtime"
"testing" "testing"
"inet.af/netaddr" "inet.af/netaddr"
@ -41,6 +39,9 @@ func deriveBindhost(t *testing.T) string {
} }
func TestDeriveBindhost(t *testing.T) { func TestDeriveBindhost(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skip("requires GOOS=linux")
}
t.Log(deriveBindhost(t)) t.Log(deriveBindhost(t))
} }

View File

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux
// +build linux
package vms package vms
import ( import (

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms

View File

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux
// +build linux
package vms package vms
import ( import (

View File

@ -2,20 +2,19 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms
import "testing" import "testing"
func TestRunUbuntu1804(t *testing.T) { func TestRunUbuntu1804(t *testing.T) {
t.Parallel()
setupTests(t) setupTests(t)
testOneDistribution(t, 0, Distros[0]) testOneDistribution(t, 0, Distros[0])
} }
func TestRunUbuntu2004(t *testing.T) { func TestRunUbuntu2004(t *testing.T) {
t.Parallel()
setupTests(t) setupTests(t)
testOneDistribution(t, 1, Distros[1]) testOneDistribution(t, 1, Distros[1])
} }

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build !windows
// +build linux // +build !windows
package vms package vms