diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-03-04 21:27:36 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-04 21:27:36 +0100 |
commit | 04b08da9af0c450d645ab7389d1467308cfc2db8 (patch) | |
tree | db247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/pkg/go/build/deps_test.go | |
parent | 917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff) | |
download | golang-upstream/1.1_hg20130304.tar.gz |
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/pkg/go/build/deps_test.go')
-rw-r--r-- | src/pkg/go/build/deps_test.go | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/pkg/go/build/deps_test.go b/src/pkg/go/build/deps_test.go index 4e9f32a03..9a715ba60 100644 --- a/src/pkg/go/build/deps_test.go +++ b/src/pkg/go/build/deps_test.go @@ -5,10 +5,9 @@ // This file exercises the import parser but also checks that // some low-level packages do not have new dependencies added. -package build_test +package build import ( - "go/build" "sort" "testing" ) @@ -24,13 +23,13 @@ import ( // be used as dependencies by other rules. // // DO NOT CHANGE THIS DATA TO FIX BUILDS. -// +// var pkgDeps = map[string][]string{ // L0 is the lowest level, core, nearly unavoidable packages. "errors": {}, "io": {"errors", "sync"}, "runtime": {"unsafe"}, - "sync": {"sync/atomic"}, + "sync": {"sync/atomic", "unsafe"}, "sync/atomic": {"unsafe"}, "unsafe": {}, @@ -142,7 +141,7 @@ var pkgDeps = map[string][]string{ // Packages used by testing must be low-level (L2+fmt). "regexp": {"L2", "regexp/syntax"}, "regexp/syntax": {"L2"}, - "runtime/debug": {"L2", "fmt", "io/ioutil", "os"}, + "runtime/debug": {"L2", "fmt", "io/ioutil", "os", "time"}, "runtime/pprof": {"L2", "fmt", "text/tabwriter"}, "text/tabwriter": {"L2"}, @@ -177,7 +176,7 @@ var pkgDeps = map[string][]string{ }, // One of a kind. - "archive/tar": {"L4", "OS"}, + "archive/tar": {"L4", "OS", "syscall"}, "archive/zip": {"L4", "OS", "compress/flate"}, "compress/bzip2": {"L4"}, "compress/flate": {"L4"}, @@ -249,18 +248,23 @@ var pkgDeps = map[string][]string{ "net/mail": {"L4", "NET", "OS"}, "net/textproto": {"L4", "OS", "net"}, + // Support libraries for crypto that aren't L2. + "CRYPTO-SUPPORT": { + "crypto/subtle", + }, + // Core crypto. "crypto/aes": {"L3"}, "crypto/des": {"L3"}, - "crypto/hmac": {"L3"}, + "crypto/hmac": {"L3", "CRYPTO-SUPPORT"}, "crypto/md5": {"L3"}, "crypto/rc4": {"L3"}, "crypto/sha1": {"L3"}, "crypto/sha256": {"L3"}, "crypto/sha512": {"L3"}, - "crypto/subtle": {"L3"}, "CRYPTO": { + "CRYPTO-SUPPORT", "crypto/aes", "crypto/des", "crypto/hmac", @@ -269,7 +273,6 @@ var pkgDeps = map[string][]string{ "crypto/sha1", "crypto/sha256", "crypto/sha512", - "crypto/subtle", }, // Random byte, number generation. @@ -300,7 +303,10 @@ var pkgDeps = map[string][]string{ "L4", "CRYPTO-MATH", "CGO", "OS", "crypto/x509", "encoding/pem", "net", "syscall", }, - "crypto/x509": {"L4", "CRYPTO-MATH", "OS", "CGO", "crypto/x509/pkix", "encoding/pem", "syscall"}, + "crypto/x509": { + "L4", "CRYPTO-MATH", "OS", "CGO", + "crypto/x509/pkix", "encoding/pem", "encoding/hex", "net", "syscall", + }, "crypto/x509/pkix": {"L4", "CRYPTO-MATH"}, // Simple net+crypto-aware packages. @@ -375,7 +381,7 @@ func TestDependencies(t *testing.T) { } sort.Strings(all) - ctxt := build.Default + ctxt := Default test := func(mustImport bool) { for _, pkg := range all { if isMacro(pkg) { |