Skip to content

Commit 6d82497

Browse files
committed
cmd/coordinator: support skipping redundant tests on try runs
Also, don't start obtaining test sharding buildlets early if they're reverse buildlets. Reverse buildlets are either immediately available, or they're not. No point monopolizing them earlier than needed. Updates golang/go#17104 Change-Id: If5a0bbd0c59b55750adfeeaa8d0f81cdbcc8ad48 Reviewed-on: https://go-review.googlesource.com/29473 Reviewed-by: Matthew Dempsky <[email protected]>
1 parent 9c8f13d commit 6d82497

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

cmd/coordinator/coordinator.go

+15-1
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ func (st *buildStatus) expectedBuildletStartDuration() time.Duration {
13411341
// ready, such that they're ready when make.bash is done. But we don't
13421342
// want to start too early, lest we waste idle resources during make.bash.
13431343
func (st *buildStatus) getHelpersReadySoon() {
1344-
if st.isSubrepo() || st.conf.NumTestHelpers(st.isTry()) == 0 {
1344+
if st.isSubrepo() || st.conf.NumTestHelpers(st.isTry()) == 0 || st.conf.IsReverse {
13451345
return
13461346
}
13471347
time.AfterFunc(st.expectedMakeBashDuration()-st.expectedBuildletStartDuration(),
@@ -1819,11 +1819,25 @@ func (st *buildStatus) distTestList() (names []string, remoteErr, err error) {
18191819
return
18201820
}
18211821
for _, test := range strings.Fields(buf.String()) {
1822+
if st.shouldSkipTest(test) {
1823+
continue
1824+
}
18221825
names = append(names, test)
18231826
}
18241827
return names, nil, nil
18251828
}
18261829

1830+
// shouldSkipTest reports whether this test should be skipped. We
1831+
// only do this for slow builders running redundant tests. (That is,
1832+
// tests which have identical behavior across different ports)
1833+
func (st *buildStatus) shouldSkipTest(testName string) bool {
1834+
switch testName {
1835+
case "api":
1836+
return st.isTry() && st.name != "linux-amd64"
1837+
}
1838+
return false
1839+
}
1840+
18271841
func (st *buildStatus) newTestSet(names []string) *testSet {
18281842
set := &testSet{
18291843
st: st,

0 commit comments

Comments
 (0)