Blame SOURCES/go1.5-zoneinfo_testing_only.patch

22e218
diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go
22e218
--- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time	2017-12-05 01:10:10.000000000 +0100
22e218
+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go	2017-12-05 14:55:10.574637475 +0100
22e218
@@ -4,13 +4,15 @@
22e218
 
22e218
 package time
22e218
 
22e218
+import "runtime"
22e218
+
22e218
 func init() {
22e218
 	// force US/Pacific for time zone tests
22e218
 	ForceUSPacificForTesting()
22e218
 }
22e218
 
22e218
 func initTestingZone() {
22e218
-	z, err := loadLocation("America/Los_Angeles", zoneSources[len(zoneSources)-1:])
22e218
+	z, err := loadLocation("America/Los_Angeles", zoneSources)
22e218
 	if err != nil {
22e218
 		panic("cannot load America/Los_Angeles for testing: " + err.Error())
22e218
 	}
22e218
@@ -21,8 +23,9 @@ func initTestingZone() {
22e218
 var OrigZoneSources = zoneSources
22e218
 
22e218
 func forceZipFileForTesting(zipOnly bool) {
22e218
-	zoneSources = make([]string, len(OrigZoneSources))
22e218
+	zoneSources = make([]string, len(OrigZoneSources)+1)
22e218
 	copy(zoneSources, OrigZoneSources)
22e218
+	zoneSources = append(zoneSources, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
22e218
 	if zipOnly {
22e218
 		zoneSources = zoneSources[len(zoneSources)-1:]
22e218
 	}
22e218
diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go
22e218
--- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time	2017-12-05 01:10:10.000000000 +0100
22e218
+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go	2017-12-05 14:58:09.823109248 +0100
22e218
@@ -8,6 +8,7 @@ import (
22e218
 	"fmt"
22e218
 	"os"
22e218
 	"reflect"
22e218
+	"runtime"
22e218
 	"testing"
22e218
 	"time"
22e218
 )
22e218
@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testi
22e218
 		t.Fatal(err)
22e218
 	}
22e218
 
22e218
-	tzinfo, err := time.LoadTzinfo(locationName, time.OrigZoneSources[len(time.OrigZoneSources)-1])
22e218
+	tzinfo, err := time.LoadTzinfo(locationName, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
22e218
 	if err != nil {
22e218
 		t.Fatal(err)
22e218
 	}
22e218
diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go
22e218
--- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time	2017-12-05 01:10:10.000000000 +0100
22e218
+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go	2017-12-05 14:55:10.574637475 +0100
22e218
@@ -12,7 +12,6 @@
22e218
 package time
22e218
 
22e218
 import (
22e218
-	"runtime"
22e218
 	"syscall"
22e218
 )
22e218
 
22e218
@@ -22,7 +21,6 @@ var zoneSources = []string{
22e218
 	"/usr/share/zoneinfo/",
22e218
 	"/usr/share/lib/zoneinfo/",
22e218
 	"/usr/lib/locale/TZ/",
22e218
-	runtime.GOROOT() + "/lib/time/zoneinfo.zip",
22e218
 }
22e218
 
22e218
 func initLocal() {