Commit d9fdf88f authored by Russ Cox's avatar Russ Cox

net: make all.bat run for ordinary Windows users

This CL is required for all.bat to work out of the box on
my Windows 8 laptop.

These tests either require the firewall to be turned off
or require the user to be in the Administrators group.
I don't know which.

Alex may follow up with a refinement of the test to
allow them to run if the user is in the Administrators
group.

Fixes #6392.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13421049
parent 647eaed9
......@@ -84,6 +84,9 @@ func TestConnICMPEcho(t *testing.T) {
case "plan9":
t.Skipf("skipping test on %q", runtime.GOOS)
case "windows":
if testing.Short() || !*testExternal {
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
}
default:
if os.Getuid() != 0 {
t.Skip("skipping test; must be root")
......@@ -158,6 +161,9 @@ func TestPacketConnICMPEcho(t *testing.T) {
case "plan9":
t.Skipf("skipping test on %q", runtime.GOOS)
case "windows":
if testing.Short() || !*testExternal {
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
}
default:
if os.Getuid() != 0 {
t.Skip("skipping test; must be root")
......
......@@ -25,6 +25,10 @@ var ipv4MulticastListenerTests = []struct {
// port.
func TestIPv4MulticastListener(t *testing.T) {
switch runtime.GOOS {
case "windows":
if testing.Short() || !*testExternal {
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
}
case "plan9":
t.Skipf("skipping test on %q", runtime.GOOS)
}
......
......@@ -32,6 +32,9 @@ func packetConnTestData(t *testing.T, net string, i int) ([]byte, func()) {
t.Logf("skipping %q test on %q", net, runtime.GOOS)
}
case "windows":
if testing.Short() || !*testExternal {
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
}
default:
if os.Getuid() != 0 {
return nil, func() {
......
......@@ -177,6 +177,9 @@ func TestIPConnSpecificMethods(t *testing.T) {
case "plan9":
t.Skipf("skipping test on %q", runtime.GOOS)
case "windows":
if testing.Short() || !*testExternal {
t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
}
default:
if os.Getuid() != 0 {
t.Skipf("skipping test; must be root")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment