~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/go/build/deps_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
// This file exercises the import parser but also checks that
6
6
// some low-level packages do not have new dependencies added.
7
7
 
8
 
package build_test
 
8
package build
9
9
 
10
10
import (
11
 
        "go/build"
12
11
        "sort"
13
12
        "testing"
14
13
)
24
23
// be used as dependencies by other rules.
25
24
//
26
25
// DO NOT CHANGE THIS DATA TO FIX BUILDS.
27
 
// 
 
26
//
28
27
var pkgDeps = map[string][]string{
29
28
        // L0 is the lowest level, core, nearly unavoidable packages.
30
29
        "errors":      {},
31
30
        "io":          {"errors", "sync"},
32
31
        "runtime":     {"unsafe"},
33
 
        "sync":        {"sync/atomic"},
 
32
        "sync":        {"sync/atomic", "unsafe"},
34
33
        "sync/atomic": {"unsafe"},
35
34
        "unsafe":      {},
36
35
 
48
47
        "math":          {"unsafe"},
49
48
        "math/cmplx":    {"math"},
50
49
        "math/rand":     {"L0", "math"},
51
 
        "sort":          {"math"},
 
50
        "sort":          {},
52
51
        "strconv":       {"L0", "unicode/utf8", "math"},
53
52
        "unicode/utf16": {},
54
53
        "unicode/utf8":  {},
142
141
        // Packages used by testing must be low-level (L2+fmt).
143
142
        "regexp":         {"L2", "regexp/syntax"},
144
143
        "regexp/syntax":  {"L2"},
145
 
        "runtime/debug":  {"L2", "fmt", "io/ioutil", "os"},
 
144
        "runtime/debug":  {"L2", "fmt", "io/ioutil", "os", "time"},
146
145
        "runtime/pprof":  {"L2", "fmt", "text/tabwriter"},
147
146
        "text/tabwriter": {"L2"},
148
147
 
177
176
        },
178
177
 
179
178
        // One of a kind.
180
 
        "archive/tar":         {"L4", "OS"},
 
179
        "archive/tar":         {"L4", "OS", "syscall"},
181
180
        "archive/zip":         {"L4", "OS", "compress/flate"},
182
181
        "compress/bzip2":      {"L4"},
183
182
        "compress/flate":      {"L4"},
249
248
        "net/mail":      {"L4", "NET", "OS"},
250
249
        "net/textproto": {"L4", "OS", "net"},
251
250
 
 
251
        // Support libraries for crypto that aren't L2.
 
252
        "CRYPTO-SUPPORT": {
 
253
                "crypto/subtle",
 
254
        },
 
255
 
252
256
        // Core crypto.
253
257
        "crypto/aes":    {"L3"},
254
258
        "crypto/des":    {"L3"},
255
 
        "crypto/hmac":   {"L3"},
 
259
        "crypto/hmac":   {"L3", "CRYPTO-SUPPORT"},
256
260
        "crypto/md5":    {"L3"},
257
261
        "crypto/rc4":    {"L3"},
258
262
        "crypto/sha1":   {"L3"},
259
263
        "crypto/sha256": {"L3"},
260
264
        "crypto/sha512": {"L3"},
261
 
        "crypto/subtle": {"L3"},
262
265
 
263
266
        "CRYPTO": {
 
267
                "CRYPTO-SUPPORT",
264
268
                "crypto/aes",
265
269
                "crypto/des",
266
270
                "crypto/hmac",
269
273
                "crypto/sha1",
270
274
                "crypto/sha256",
271
275
                "crypto/sha512",
272
 
                "crypto/subtle",
273
276
        },
274
277
 
275
278
        // Random byte, number generation.
300
303
                "L4", "CRYPTO-MATH", "CGO", "OS",
301
304
                "crypto/x509", "encoding/pem", "net", "syscall",
302
305
        },
303
 
        "crypto/x509":      {"L4", "CRYPTO-MATH", "OS", "CGO", "crypto/x509/pkix", "encoding/pem", "syscall"},
 
306
        "crypto/x509": {
 
307
                "L4", "CRYPTO-MATH", "OS", "CGO",
 
308
                "crypto/x509/pkix", "encoding/pem", "encoding/hex", "net", "syscall",
 
309
        },
304
310
        "crypto/x509/pkix": {"L4", "CRYPTO-MATH"},
305
311
 
306
312
        // Simple net+crypto-aware packages.
375
381
        }
376
382
        sort.Strings(all)
377
383
 
378
 
        ctxt := build.Default
 
384
        ctxt := Default
379
385
        test := func(mustImport bool) {
380
386
                for _, pkg := range all {
381
387
                        if isMacro(pkg) {