about summary refs log tree commit diff
path: root/pkgs/development/compilers/go/skip-external-network-tests-1.16.patch
diff options
context:
space:
mode:
authorColin L Rice <colin@daedrum.net>2021-01-06 02:37:58 -0500
committerzowoq <59103226+zowoq@users.noreply.github.com>2021-02-17 06:30:32 +1000
commit9eb88a2e1de744ccd397d695e0811dc017b5c0fb (patch)
treece595fecbd2de0d4dd2ca8f7760935b610dd5322 /pkgs/development/compilers/go/skip-external-network-tests-1.16.patch
parent35fbdb657f272b1cadb8159bcdc1ed7ad7cd4bb4 (diff)
go_1_16: init at 1.16
Changes are minor - I ended up just patching the ssl certs at the root
file, rather than trying to keep up with the various darwin changes.

The externalnetwork test helper location changed, to so I had to update
that patch as well.

- Add xcbuild as propagatedBuildInput on darwin https://github.com/golang/go/commit/7e25bdba5e79d223566745fca2410f725a6dedda
Diffstat (limited to 'pkgs/development/compilers/go/skip-external-network-tests-1.16.patch')
-rw-r--r--pkgs/development/compilers/go/skip-external-network-tests-1.16.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/compilers/go/skip-external-network-tests-1.16.patch b/pkgs/development/compilers/go/skip-external-network-tests-1.16.patch
new file mode 100644
index 0000000000000..8f1eb6be7bb8e
--- /dev/null
+++ b/pkgs/development/compilers/go/skip-external-network-tests-1.16.patch
@@ -0,0 +1,33 @@
+diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
+index c902b1404f..66016088a2 100644
+--- a/src/internal/testenv/testenv.go
++++ b/src/internal/testenv/testenv.go
+@@ -163,13 +163,15 @@ func MustHaveExecPath(t testing.TB, path string) {
+ // HasExternalNetwork reports whether the current system can use
+ // external (non-localhost) networks.
+ func HasExternalNetwork() bool {
+-	return !testing.Short() && runtime.GOOS != "js"
++	// Nix sandbox does not external network in sandbox
++	return false
+ }
+ 
+ // MustHaveExternalNetwork checks that the current system can use
+ // external (non-localhost) networks.
+ // If not, MustHaveExternalNetwork calls t.Skip with an explanation.
+ func MustHaveExternalNetwork(t testing.TB) {
++	t.Skipf("Nix sandbox does not have networking")
+ 	if runtime.GOOS == "js" {
+ 		t.Skipf("skipping test: no external network on %s", runtime.GOOS)
+ 	}
+diff --git a/src/net/dial_test.go b/src/net/dial_test.go
+index 57cf5554ad..d00be53b2c 100644
+--- a/src/net/dial_test.go
++++ b/src/net/dial_test.go
+@@ -990,6 +990,7 @@ func TestDialerControl(t *testing.T) {
+ // except that it won't skip testing on non-mobile builders.
+ func mustHaveExternalNetwork(t *testing.T) {
+ 	t.Helper()
++	t.Skipf("Nix sandbox does not have networking")
+ 	mobile := runtime.GOOS == "android" || runtime.GOOS == "ios"
+ 	if testenv.Builder() == "" || mobile {
+ 		testenv.MustHaveExternalNetwork(t)