build: shorten a few packages with long tests

Takes 3% off my all.bash run time.

For #10571.

Change-Id: I8f00f523d6919e87182d35722a669b0b96b8218b
Reviewed-on: https://go-review.googlesource.com/18087
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/math/big/int_test.go b/src/math/big/int_test.go
index 616a562..2f55a7e 100644
--- a/src/math/big/int_test.go
+++ b/src/math/big/int_test.go
@@ -1378,6 +1378,14 @@
 				t.Errorf("#%d: failed (sqrt(e) = %s)", i, &sqrt)
 			}
 		}
+
+		if testing.Short() && i > 2 {
+			break
+		}
+	}
+
+	if testing.Short() {
+		return
 	}
 
 	// exhaustive test for small values