Blame SOURCES/go1.5-zoneinfo_testing_only.patch

9fd32d
diff --git a/src/time/internal_test.go b/src/time/internal_test.go
9fd32d
index f0dddb7..415949a 100644
9fd32d
--- a/src/time/internal_test.go
9fd32d
+++ b/src/time/internal_test.go
034e53
@@ -4,13 +4,15 @@
034e53
 
034e53
 package time
034e53
 
034e53
+import "runtime"
034e53
+
034e53
 func init() {
034e53
 	// force US/Pacific for time zone tests
034e53
 	ForceUSPacificForTesting()
034e53
 }
034e53
 
034e53
 func initTestingZone() {
034e53
-	z, err := loadLocation("America/Los_Angeles", zoneSources[len(zoneSources)-1:])
034e53
+	z, err := loadLocation("America/Los_Angeles", zoneSources)
034e53
 	if err != nil {
9fd32d
 		panic("cannot load America/Los_Angeles for testing: " + err.Error() + "; you may want to use -tags=timetzdata")
034e53
 	}
034e53
@@ -21,8 +23,9 @@ func initTestingZone() {
034e53
 var OrigZoneSources = zoneSources
034e53
 
034e53
 func forceZipFileForTesting(zipOnly bool) {
034e53
-	zoneSources = make([]string, len(OrigZoneSources))
034e53
+	zoneSources = make([]string, len(OrigZoneSources)+1)
034e53
 	copy(zoneSources, OrigZoneSources)
034e53
+	zoneSources = append(zoneSources, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
034e53
 	if zipOnly {
034e53
 		zoneSources = zoneSources[len(zoneSources)-1:]
034e53
 	}
9fd32d
diff --git a/src/time/zoneinfo_test.go b/src/time/zoneinfo_test.go
9fd32d
index f032aa7..e3e5547 100644
9fd32d
--- a/src/time/zoneinfo_test.go
9fd32d
+++ b/src/time/zoneinfo_test.go
9fd32d
@@ -9,6 +9,7 @@ import (
034e53
 	"fmt"
034e53
 	"os"
034e53
 	"reflect"
034e53
+	"runtime"
034e53
 	"testing"
034e53
 	"time"
034e53
 )
9fd32d
@@ -137,7 +138,7 @@ func TestLoadLocationFromTZData(t *testing.T) {
034e53
 		t.Fatal(err)
034e53
 	}
034e53
 
034e53
-	tzinfo, err := time.LoadTzinfo(locationName, time.OrigZoneSources[len(time.OrigZoneSources)-1])
034e53
+	tzinfo, err := time.LoadTzinfo(locationName, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
034e53
 	if err != nil {
034e53
 		t.Fatal(err)
034e53
 	}
9fd32d
diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
9fd32d
index 23f8b3c..228db1b 100644
9fd32d
--- a/src/time/zoneinfo_unix.go
9fd32d
+++ b/src/time/zoneinfo_unix.go
034e53
@@ -12,7 +12,6 @@
034e53
 package time
034e53
 
034e53
 import (
034e53
-	"runtime"
034e53
 	"syscall"
034e53
 )
034e53
 
034e53
@@ -22,7 +21,6 @@ var zoneSources = []string{
034e53
 	"/usr/share/zoneinfo/",
034e53
 	"/usr/share/lib/zoneinfo/",
034e53
 	"/usr/lib/locale/TZ/",
034e53
-	runtime.GOROOT() + "/lib/time/zoneinfo.zip",
034e53
 }
034e53
 
034e53
 func initLocal() {