]> Cypherpunks repositories - gostls13.git/commitdiff
build: add GOTESTONLY environment test for Plan 9's run.rc
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Jan 2015 04:10:32 +0000 (20:10 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Jan 2015 04:35:23 +0000 (04:35 +0000)
$GOTESTONLY controls which set of tests gets run. Only "std" is
supported. This should bring the time of plan9 builder down
from 90 minutes to a maybe 10-15 minutes when running on GCE.

(Plan 9 has performance problems when running on GCE, and/or with the
os/exec package)

This is a temporary workaround for one builder. The other Plan 9
builders will continue to do full builds. The plan9 buidler will be
renamed plan9-386-gcepartial or something to indicate it's not running
the 'test/*' directory, or API tests. Go on Plan 9 has bigger problems
for now. This lets us get trybots going sooner including Plan 9,
without waiting 90+ minutes.

Update #9491

Change-Id: Ic505e9169c6b304ed4029b7bdfb77bb5c8fa8daa
Reviewed-on: https://go-review.googlesource.com/2522
Reviewed-by: Rob Pike <r@golang.org>
src/run.rc

index 54286ac09d80e00c16cfb236a7931fbbea161a5b..8d2ce38a0e790fc38cca6e358d4b5278440c571c 100755 (executable)
@@ -32,6 +32,14 @@ echo '# Testing packages.'
 time go test std -short -timeout 240s
 echo
 
+# Temporary GCE builder hack until Plan 9 on GCE is fast enough.
+# See https://golang.org/issue/9491
+if(~ $GOTESTONLY std) {
+       echo
+       echo PARTIAL TESTS PASSED: std
+       exit
+}
+
 # We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
 # creation of first goroutines and first garbage collections in the parallel setting.
 # TODO(bradfitz,0intro): make this not be 15 minutes once Plan 9 runs quickly on GCE.