]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pack: make a test less disk-intensive in short mode
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Jan 2015 12:45:56 +0000 (13:45 +0100)
committerRuss Cox <rsc@golang.org>
Wed, 4 Feb 2015 21:04:46 +0000 (21:04 +0000)
Fixes #9656

Change-Id: I1158636683492ef12eeafb12e257d205026adc3f
Reviewed-on: https://go-review.googlesource.com/3175
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/3910
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/pack/pack_test.go

index cf6121fcc1149557200e7cb12d051de4082a05d0..fbc6a3c698200201a07f7abc2abc51d09f269357 100644 (file)
@@ -257,8 +257,15 @@ func TestLargeDefs(t *testing.T) {
                }
        }
 
+       n := 10000
+       if testing.Short() {
+               // Issue 9656: 10,000 is too aggressive for several
+               // builders, with ~120 MB of disk consumed. 1,000 is
+               // still enough to exercise the old bug.
+               n = 1000
+       }
        printf("package large\n\ntype T struct {\n")
-       for i := 0; i < 10000; i++ {
+       for i := 0; i < n; i++ {
                printf("f%d int `tag:\"", i)
                for j := 0; j < 100; j++ {
                        printf("t%d=%d,", j, j)