@@ -8,6 +8,7 @@ package dashboard
8
8
9
9
import (
10
10
"fmt"
11
+ "sort"
11
12
"strconv"
12
13
"strings"
13
14
@@ -17,6 +18,7 @@ import (
17
18
// Builders are the different build configurations.
18
19
// The keys are like "darwin-amd64" or "linux-386-387".
19
20
// This map should not be modified by other packages.
21
+ // Initialization happens below, via calls to addBuilder.
20
22
var Builders = map [string ]BuildConfig {}
21
23
22
24
// Hosts contains the names and configs of all the types of
@@ -119,13 +121,6 @@ var Hosts = map[string]*HostConfig{
119
121
goBootstrapURLTmpl : "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz" ,
120
122
env : []string {"CC=clang" },
121
123
},
122
- "host-netbsd-70" : & HostConfig {
123
- VMImage : "netbsd-amd64-70" ,
124
- Notes : "NetBSD 7.0_2016Q4; GCE VM is built from script in build/env/netbsd-amd64" ,
125
- machineType : "n1-highcpu-2" ,
126
- buildletURLTmpl : "http://storage.googleapis.com/$BUCKET/buildlet.netbsd-amd64" ,
127
- goBootstrapURLTmpl : "https://storage.googleapis.com/$BUCKET/gobootstrap-netbsd-amd64.tar.gz" ,
128
- },
129
124
"host-netbsd-71" : & HostConfig {
130
125
VMImage : "netbsd-amd64-71" ,
131
126
Notes : "NetBSD 7.1RC1; GCE VM is built from script in build/env/netbsd-amd64" ,
@@ -409,6 +404,7 @@ type BuildConfig struct {
409
404
410
405
Notes string // notes for humans
411
406
407
+ TryBot bool // be a trybot
412
408
TryOnly bool // only used for trybots, and not regular builds
413
409
CompileOnly bool // if true, compile tests, but don't run them
414
410
FlakyNet bool // network tests are flaky (try anyway, but ignore some failures)
@@ -683,6 +679,7 @@ func init() {
683
679
addBuilder (BuildConfig {
684
680
Name : "freebsd-amd64-gce101" ,
685
681
HostType : "host-freebsd-101-gce" ,
682
+ TryBot : true ,
686
683
numTestHelpers : 2 ,
687
684
numTryTestHelpers : 4 ,
688
685
})
@@ -707,6 +704,7 @@ func init() {
707
704
addBuilder (BuildConfig {
708
705
Name : "linux-386" ,
709
706
HostType : "host-linux-kubestd" ,
707
+ TryBot : true ,
710
708
env : []string {"GOARCH=386" , "GOHOSTARCH=386" },
711
709
numTestHelpers : 1 ,
712
710
numTryTestHelpers : 3 ,
@@ -720,21 +718,28 @@ func init() {
720
718
addBuilder (BuildConfig {
721
719
Name : "linux-amd64" ,
722
720
HostType : "host-linux-kubestd" ,
721
+ TryBot : true ,
723
722
numTestHelpers : 3 ,
724
723
})
724
+ addBuilder (BuildConfig {
725
+ Name : "linux-amd64-alpine" ,
726
+ HostType : "host-linux-x86-alpine" ,
727
+ })
725
728
// Add the -vetall builder. The builder name suffix "-vetall" is recognized by cmd/dist/test.go
726
729
// to only run the "go vet std cmd" test and no others.
727
730
addBuilder (BuildConfig {
728
731
Name : "misc-vet-vetall" ,
729
732
HostType : "host-linux-kubestd" ,
730
733
Notes : "Runs vet over the standard library." ,
734
+ TryBot : true ,
731
735
numTestHelpers : 5 ,
732
736
})
733
737
734
738
addMiscCompile := func (suffix , rx string ) {
735
739
addBuilder (BuildConfig {
736
740
Name : "misc-compile" + suffix ,
737
741
HostType : "host-linux-kubestd" ,
742
+ TryBot : true ,
738
743
TryOnly : true ,
739
744
CompileOnly : true ,
740
745
Notes : "Runs buildall.sh to cross-compile std packages for " + rx + ", but doesn't run any tests." ,
@@ -772,13 +777,15 @@ func init() {
772
777
addBuilder (BuildConfig {
773
778
Name : "linux-amd64-ssacheck" ,
774
779
HostType : "host-linux-kubestd" ,
780
+ TryBot : true ,
775
781
CompileOnly : true ,
776
782
Notes : "SSA internal checks enabled" ,
777
783
env : []string {"GO_GCFLAGS=-d=ssa/check/on,dclstack" },
778
784
})
779
785
addBuilder (BuildConfig {
780
786
Name : "linux-amd64-race" ,
781
787
HostType : "host-linux-kubestd" ,
788
+ TryBot : true ,
782
789
numTestHelpers : 2 ,
783
790
numTryTestHelpers : 5 ,
784
791
})
@@ -808,6 +815,7 @@ func init() {
808
815
addBuilder (BuildConfig {
809
816
Name : "linux-arm" ,
810
817
HostType : "host-linux-arm" ,
818
+ TryBot : true ,
811
819
FlakyNet : true ,
812
820
numTestHelpers : 2 ,
813
821
numTryTestHelpers : 7 ,
@@ -836,26 +844,27 @@ func init() {
836
844
addBuilder (BuildConfig {
837
845
Name : "nacl-386" ,
838
846
HostType : "host-nacl-kube" ,
847
+ TryBot : true ,
839
848
numTestHelpers : 3 ,
840
849
env : []string {"GOOS=nacl" , "GOARCH=386" , "GOHOSTOS=linux" , "GOHOSTARCH=amd64" },
841
850
})
842
851
addBuilder (BuildConfig {
843
852
Name : "nacl-amd64p32" ,
844
853
HostType : "host-nacl-kube" ,
854
+ TryBot : true ,
845
855
numTestHelpers : 3 ,
846
856
env : []string {"GOOS=nacl" , "GOARCH=amd64p32" , "GOHOSTOS=linux" , "GOHOSTARCH=amd64" },
847
857
})
848
858
addBuilder (BuildConfig {
849
859
Name : "openbsd-amd64-60" ,
850
860
HostType : "host-openbsd-amd64-60" ,
861
+ TryBot : true ,
851
862
numTestHelpers : 2 ,
852
863
numTryTestHelpers : 5 ,
853
864
})
854
865
addBuilder (BuildConfig {
855
- Name : "openbsd-386-60" ,
856
- HostType : "host-openbsd-386-60" ,
857
- numTestHelpers : 2 ,
858
- numTryTestHelpers : 5 ,
866
+ Name : "openbsd-386-60" ,
867
+ HostType : "host-openbsd-386-60" ,
859
868
})
860
869
addBuilder (BuildConfig {
861
870
Name : "netbsd-amd64-71" ,
@@ -875,6 +884,7 @@ func init() {
875
884
Name : "windows-amd64-gce" ,
876
885
HostType : "host-windows-gce" ,
877
886
env : []string {"GOARCH=amd64" , "GOHOSTARCH=amd64" },
887
+ TryBot : true ,
878
888
numTestHelpers : 1 ,
879
889
numTryTestHelpers : 5 ,
880
890
})
@@ -888,6 +898,7 @@ func init() {
888
898
Name : "windows-386-gce" ,
889
899
HostType : "host-windows-gce" ,
890
900
env : []string {"GOARCH=386" , "GOHOSTARCH=386" },
901
+ TryBot : true ,
891
902
numTestHelpers : 1 ,
892
903
numTryTestHelpers : 5 ,
893
904
})
@@ -902,6 +913,7 @@ func init() {
902
913
addBuilder (BuildConfig {
903
914
Name : "darwin-amd64-10_11" ,
904
915
HostType : "host-darwin-10_11" ,
916
+ TryBot : true ,
905
917
numTestHelpers : 2 ,
906
918
numTryTestHelpers : 3 ,
907
919
})
@@ -1037,6 +1049,8 @@ func (c BuildConfig) isMobile() bool {
1037
1049
return strings .HasPrefix (c .Name , "android-" ) || strings .HasPrefix (c .Name , "darwin-arm" )
1038
1050
}
1039
1051
1052
+ // addBuilder adds c to the Builders map after doing some sanity
1053
+ // checks.
1040
1054
func addBuilder (c BuildConfig ) {
1041
1055
if c .Name == "" {
1042
1056
panic ("empty name" )
@@ -1062,5 +1076,29 @@ func addBuilder(c BuildConfig) {
1062
1076
if _ , ok := Hosts [c .HostType ]; ! ok {
1063
1077
panic (fmt .Sprintf ("undefined HostType %q for builder %q" , c .HostType , c .Name ))
1064
1078
}
1079
+
1080
+ types := 0
1081
+ for _ , fn := range []func () bool {c .IsReverse , c .IsKube , c .IsGCE } {
1082
+ if fn () {
1083
+ types ++
1084
+ }
1085
+ }
1086
+ if types != 1 {
1087
+ panic (fmt .Sprintf ("build config %q host type inconsistent (must be Reverse, Kube, or GCE)" , c .Name ))
1088
+ }
1089
+
1065
1090
Builders [c .Name ] = c
1066
1091
}
1092
+
1093
+ // TrybotBuilderNames returns the names of the builder configs
1094
+ // with the TryBot field set true.
1095
+ func TrybotBuilderNames () []string {
1096
+ var ret []string
1097
+ for name , conf := range Builders {
1098
+ if conf .TryBot {
1099
+ ret = append (ret , name )
1100
+ }
1101
+ }
1102
+ sort .Strings (ret )
1103
+ return ret
1104
+ }
0 commit comments