2015-01-16 03:29:16 +03:00
|
|
|
// Copyright 2015 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package dashboard
|
|
|
|
|
|
|
|
import (
|
2019-10-16 09:02:29 +03:00
|
|
|
"bytes"
|
2019-03-07 20:44:41 +03:00
|
|
|
"fmt"
|
2022-07-26 19:05:33 +03:00
|
|
|
"os"
|
2019-10-16 09:02:29 +03:00
|
|
|
"os/exec"
|
|
|
|
"path/filepath"
|
2019-11-07 16:15:55 +03:00
|
|
|
"regexp"
|
2019-10-16 09:02:29 +03:00
|
|
|
"runtime"
|
|
|
|
"sort"
|
2015-01-16 03:29:16 +03:00
|
|
|
"strings"
|
|
|
|
"testing"
|
2019-02-14 05:18:06 +03:00
|
|
|
"time"
|
2020-08-20 18:53:58 +03:00
|
|
|
|
|
|
|
"github.com/google/go-cmp/cmp"
|
2015-01-16 03:29:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestOSARCHAccessors(t *testing.T) {
|
|
|
|
valid := func(s string) bool { return s != "" && !strings.Contains(s, "-") }
|
|
|
|
for _, conf := range Builders {
|
|
|
|
os := conf.GOOS()
|
|
|
|
arch := conf.GOARCH()
|
|
|
|
osArch := os + "-" + arch
|
|
|
|
if !valid(os) || !valid(arch) || !(conf.Name == osArch || strings.HasPrefix(conf.Name, osArch+"-")) {
|
|
|
|
t.Errorf("OS+ARCH(%q) = %q, %q; invalid", conf.Name, os, arch)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-04-12 03:35:37 +03:00
|
|
|
|
2019-02-14 05:18:06 +03:00
|
|
|
func TestDistTestsExecTimeout(t *testing.T) {
|
|
|
|
tests := []struct {
|
|
|
|
c *BuildConfig
|
|
|
|
want time.Duration
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
&BuildConfig{
|
|
|
|
env: []string{},
|
|
|
|
testHostConf: &HostConfig{},
|
|
|
|
},
|
|
|
|
20 * time.Minute,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&BuildConfig{
|
|
|
|
env: []string{"GO_TEST_TIMEOUT_SCALE=2"},
|
|
|
|
testHostConf: &HostConfig{},
|
|
|
|
},
|
|
|
|
40 * time.Minute,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&BuildConfig{
|
|
|
|
env: []string{},
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
env: []string{"GO_TEST_TIMEOUT_SCALE=3"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
60 * time.Minute,
|
|
|
|
},
|
|
|
|
// BuildConfig's env takes precedence:
|
|
|
|
{
|
|
|
|
&BuildConfig{
|
|
|
|
env: []string{"GO_TEST_TIMEOUT_SCALE=2"},
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
env: []string{"GO_TEST_TIMEOUT_SCALE=3"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
40 * time.Minute,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
for i, tt := range tests {
|
|
|
|
got := tt.c.DistTestsExecTimeout(nil)
|
|
|
|
if got != tt.want {
|
|
|
|
t.Errorf("%d. got %v; want %v", i, got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-07 23:29:05 +03:00
|
|
|
// TestTrybots tests that a given repo & its branch yields the provided complete
|
|
|
|
// set of builders. See also: TestPostSubmit, which tests only post-submit
|
|
|
|
// builders, and TestBuilderConfig, which tests both trybots and post-submit
|
|
|
|
// builders, both at arbitrary branches.
|
2019-03-07 20:44:41 +03:00
|
|
|
func TestTrybots(t *testing.T) {
|
|
|
|
tests := []struct {
|
|
|
|
repo string // "go", "net", etc
|
|
|
|
branch string // of repo
|
|
|
|
want []string
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
repo: "go",
|
|
|
|
branch: "master",
|
|
|
|
want: []string{
|
2022-01-05 20:21:24 +03:00
|
|
|
"freebsd-amd64-12_3",
|
2019-03-07 20:44:41 +03:00
|
|
|
"js-wasm",
|
|
|
|
"linux-386",
|
|
|
|
"linux-amd64",
|
2022-03-25 20:18:35 +03:00
|
|
|
"linux-amd64-boringcrypto",
|
2019-03-07 20:44:41 +03:00
|
|
|
"linux-amd64-race",
|
2021-03-19 20:54:17 +03:00
|
|
|
"linux-arm-aws",
|
2022-11-10 22:47:04 +03:00
|
|
|
"linux-arm64",
|
2023-01-03 18:42:02 +03:00
|
|
|
"openbsd-amd64-72",
|
2021-11-11 23:05:21 +03:00
|
|
|
"windows-386-2012",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"windows-amd64-2016",
|
|
|
|
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-darwin",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-freebsd",
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-windows-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-mips",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-mipsle",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-netbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-netbsd-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-openbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-openbsd-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-plan9",
|
|
|
|
"misc-compile-ppc",
|
2022-05-20 20:51:15 +03:00
|
|
|
"misc-compile-solaris",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-other-1",
|
|
|
|
"misc-compile-other-2",
|
2022-10-04 06:27:02 +03:00
|
|
|
"misc-compile-go1.20",
|
2019-03-07 20:44:41 +03:00
|
|
|
},
|
|
|
|
},
|
2020-11-03 06:25:51 +03:00
|
|
|
{
|
|
|
|
repo: "go",
|
2022-12-09 01:54:27 +03:00
|
|
|
branch: "release-branch.go1.20",
|
2020-11-03 06:25:51 +03:00
|
|
|
want: []string{
|
2022-01-05 20:21:24 +03:00
|
|
|
"freebsd-amd64-12_3",
|
2020-11-03 06:25:51 +03:00
|
|
|
"js-wasm",
|
|
|
|
"linux-386",
|
|
|
|
"linux-amd64",
|
2022-12-09 01:54:27 +03:00
|
|
|
"linux-amd64-boringcrypto",
|
2023-01-24 23:25:27 +03:00
|
|
|
"linux-amd64-nounified",
|
2020-11-03 06:25:51 +03:00
|
|
|
"linux-amd64-race",
|
2021-03-19 20:54:17 +03:00
|
|
|
"linux-arm-aws",
|
2022-11-10 22:47:04 +03:00
|
|
|
"linux-arm64",
|
2023-01-03 18:42:02 +03:00
|
|
|
"openbsd-amd64-72",
|
2022-12-09 01:54:27 +03:00
|
|
|
"windows-386-2008",
|
|
|
|
"windows-386-2012",
|
|
|
|
"windows-amd64-2016",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-darwin",
|
2020-11-03 06:25:51 +03:00
|
|
|
"misc-compile-freebsd",
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-windows-arm",
|
2020-11-03 06:25:51 +03:00
|
|
|
"misc-compile-mips",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-mipsle",
|
2020-11-03 06:25:51 +03:00
|
|
|
"misc-compile-netbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-netbsd-arm",
|
2020-11-03 06:25:51 +03:00
|
|
|
"misc-compile-openbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-openbsd-arm",
|
2020-11-03 06:25:51 +03:00
|
|
|
"misc-compile-plan9",
|
|
|
|
"misc-compile-ppc",
|
2022-05-20 20:51:15 +03:00
|
|
|
"misc-compile-solaris",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-other-1",
|
|
|
|
"misc-compile-other-2",
|
2022-12-09 01:54:27 +03:00
|
|
|
"misc-compile-go1.20",
|
2020-11-03 06:25:51 +03:00
|
|
|
|
|
|
|
// Include longtest builders on Go repo release branches. See issue 37827.
|
|
|
|
"linux-386-longtest",
|
|
|
|
"linux-amd64-longtest",
|
2022-12-09 01:54:27 +03:00
|
|
|
"linux-arm64-longtest",
|
|
|
|
"windows-amd64-longtest",
|
2020-11-03 06:25:51 +03:00
|
|
|
},
|
|
|
|
},
|
2019-03-07 20:44:41 +03:00
|
|
|
{
|
|
|
|
repo: "go",
|
2022-12-09 01:54:27 +03:00
|
|
|
branch: "release-branch.go1.18",
|
2019-03-07 20:44:41 +03:00
|
|
|
want: []string{
|
2022-01-05 20:21:24 +03:00
|
|
|
"freebsd-amd64-12_3",
|
2019-03-07 20:44:41 +03:00
|
|
|
"js-wasm",
|
|
|
|
"linux-386",
|
|
|
|
"linux-amd64",
|
|
|
|
"linux-amd64-race",
|
2021-03-19 20:54:17 +03:00
|
|
|
"linux-arm-aws",
|
2022-11-10 22:47:04 +03:00
|
|
|
"linux-arm64",
|
2023-01-03 18:42:02 +03:00
|
|
|
"openbsd-amd64-72",
|
2022-11-23 17:32:27 +03:00
|
|
|
"windows-386-2008-oldcc",
|
|
|
|
"windows-386-2012-oldcc",
|
|
|
|
"windows-amd64-2016-oldcc",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-darwin",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-freebsd",
|
2022-02-16 07:54:15 +03:00
|
|
|
"misc-compile-windows-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-mips",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-mipsle",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-netbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-netbsd-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-openbsd",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-openbsd-arm",
|
2019-03-07 20:44:41 +03:00
|
|
|
"misc-compile-plan9",
|
|
|
|
"misc-compile-ppc",
|
2022-05-20 20:51:15 +03:00
|
|
|
"misc-compile-solaris",
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
"misc-compile-other-1",
|
|
|
|
"misc-compile-other-2",
|
2020-05-27 01:19:05 +03:00
|
|
|
|
|
|
|
// Include longtest builders on Go repo release branches. See issue 37827.
|
|
|
|
"linux-386-longtest",
|
|
|
|
"linux-amd64-longtest",
|
2022-11-23 17:32:27 +03:00
|
|
|
"windows-amd64-longtest-oldcc",
|
2019-03-07 20:44:41 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "mobile",
|
|
|
|
branch: "master",
|
|
|
|
want: []string{
|
|
|
|
"android-amd64-emu",
|
|
|
|
"linux-amd64-androidemu",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "sys",
|
|
|
|
branch: "master",
|
|
|
|
want: []string{
|
2021-11-19 00:33:40 +03:00
|
|
|
"freebsd-386-13_0",
|
2022-01-05 20:21:24 +03:00
|
|
|
"freebsd-amd64-12_3",
|
2021-11-19 00:33:40 +03:00
|
|
|
"freebsd-amd64-13_0",
|
2019-03-07 20:44:41 +03:00
|
|
|
"linux-386",
|
|
|
|
"linux-amd64",
|
2022-03-25 20:18:35 +03:00
|
|
|
"linux-amd64-boringcrypto", // GoDeps will exclude, but not in test
|
2019-03-11 21:49:56 +03:00
|
|
|
"linux-amd64-race",
|
2021-03-19 20:54:17 +03:00
|
|
|
"linux-arm-aws",
|
2022-11-10 22:47:04 +03:00
|
|
|
"linux-arm64",
|
2022-11-15 19:17:14 +03:00
|
|
|
"netbsd-amd64-9_3",
|
2023-01-03 18:42:02 +03:00
|
|
|
"openbsd-386-72",
|
|
|
|
"openbsd-amd64-72",
|
2019-03-07 20:44:41 +03:00
|
|
|
"windows-amd64-2016",
|
|
|
|
},
|
|
|
|
},
|
2019-03-14 23:35:32 +03:00
|
|
|
{
|
|
|
|
repo: "exp",
|
|
|
|
branch: "master",
|
|
|
|
want: []string{
|
|
|
|
"linux-amd64",
|
|
|
|
"linux-amd64-race",
|
|
|
|
"windows-amd64-2016",
|
|
|
|
},
|
|
|
|
},
|
2019-03-07 20:44:41 +03:00
|
|
|
}
|
|
|
|
for i, tt := range tests {
|
|
|
|
if tt.branch == "" || tt.repo == "" {
|
|
|
|
t.Errorf("incomplete test entry %d", i)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
t.Run(fmt.Sprintf("%s/%s", tt.repo, tt.branch), func(t *testing.T) {
|
|
|
|
goBranch := tt.branch // hard-code the common case for now
|
2022-01-07 23:29:05 +03:00
|
|
|
got := TryBuildersForProject(tt.repo, tt.branch, goBranch)
|
|
|
|
checkBuildersForProject(t, got, tt.want)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func checkBuildersForProject(t *testing.T, gotBuilders []*BuildConfig, want []string) {
|
|
|
|
var got []string
|
|
|
|
for _, bc := range gotBuilders {
|
|
|
|
got = append(got, bc.Name)
|
|
|
|
}
|
|
|
|
m := map[string]bool{}
|
|
|
|
for _, b := range want {
|
|
|
|
m[b] = true
|
|
|
|
}
|
|
|
|
for _, b := range got {
|
|
|
|
if _, ok := m[b]; !ok {
|
|
|
|
t.Errorf("got unexpected %q", b)
|
|
|
|
}
|
|
|
|
delete(m, b)
|
|
|
|
}
|
|
|
|
for b := range m {
|
|
|
|
t.Errorf("missing expected %q", b)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TestPostSubmit tests that a given repo & its branch yields the provided
|
2022-01-10 22:19:02 +03:00
|
|
|
// complete set of post-submit builders. See also: TestTrybots, which tests only
|
|
|
|
// trybots, and TestBuilderConfig, which tests both trybots and post-submit
|
|
|
|
// builders, both at arbitrary branches.
|
2022-01-07 23:29:05 +03:00
|
|
|
func TestPostSubmit(t *testing.T) {
|
|
|
|
tests := []struct {
|
|
|
|
repo string // "go", "net", etc
|
|
|
|
branch string // of repo
|
|
|
|
want []string
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
repo: "vulndb",
|
|
|
|
branch: "master",
|
|
|
|
want: []string{
|
|
|
|
"linux-amd64",
|
|
|
|
"linux-amd64-longtest",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
for i, tt := range tests {
|
|
|
|
if tt.branch == "" || tt.repo == "" {
|
|
|
|
t.Fatalf("incomplete test entry %d", i)
|
|
|
|
}
|
|
|
|
t.Run(fmt.Sprintf("%s/%s", tt.repo, tt.branch), func(t *testing.T) {
|
|
|
|
goBranch := tt.branch // hard-code the common case for now
|
|
|
|
got := buildersForProject(tt.repo, tt.branch, goBranch, (*BuildConfig).BuildsRepoPostSubmit)
|
|
|
|
checkBuildersForProject(t, got, tt.want)
|
2018-10-26 22:21:58 +03:00
|
|
|
})
|
2017-04-12 03:35:37 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-08 00:26:04 +03:00
|
|
|
// TestBuilderConfig tests whether a given builder and repo at different branches is
|
|
|
|
// completely disabled ("none"),
|
|
|
|
// a TryBot and a post-submit builder ("both"), or
|
|
|
|
// a post-submit only builder ("onlyPost").
|
2019-03-07 20:44:41 +03:00
|
|
|
func TestBuilderConfig(t *testing.T) {
|
2021-05-08 00:26:04 +03:00
|
|
|
// want is a bitmask of 4 different things to assert are wanted:
|
2019-03-07 20:44:41 +03:00
|
|
|
// - being a post-submit builder
|
|
|
|
// - NOT being a post-submit builder
|
|
|
|
// - being a trybot builder
|
|
|
|
// - NOT being a post-submit builder
|
2021-05-08 00:26:04 +03:00
|
|
|
// Note: a builder cannot be configured as a TryBot without also being a post-submit builder.
|
2019-03-07 20:44:41 +03:00
|
|
|
type want uint8
|
|
|
|
const (
|
|
|
|
isTrybot want = 1 << iota
|
|
|
|
notTrybot
|
|
|
|
isBuilder // post-submit
|
|
|
|
notBuilder // not post-submit
|
2019-03-01 05:12:29 +03:00
|
|
|
|
2021-05-08 00:26:04 +03:00
|
|
|
// Available combinations:
|
2019-03-07 20:44:41 +03:00
|
|
|
none = notTrybot + notBuilder
|
|
|
|
both = isTrybot + isBuilder
|
|
|
|
onlyPost = notTrybot + isBuilder
|
|
|
|
)
|
2019-03-01 05:12:29 +03:00
|
|
|
|
2019-03-07 20:44:41 +03:00
|
|
|
type builderAndRepo struct {
|
|
|
|
testName string
|
|
|
|
builder string
|
|
|
|
repo string
|
|
|
|
branch string
|
|
|
|
goBranch string
|
|
|
|
}
|
dashboard: catch potential pitfall in TestBuilderConfig
Previously, it was possible to accidentally try to specify the
branch name for the Go repository by writing something like:
{b("nacl-386", "go@go1.13"), none},
That looks like it would test the right thing,
but in reality it would be equivalent to:
{b("nacl-386@master", "go"), none},
Because the branch of the builder always overwrites the branch
of the "go" repository.
This is not intuitive and easy to miss when reviewing or reading
the code.
Add a check that detects and panics on this b() API pitfall,
so that it is not accidentally introduced in the future, and
so that code readers don't need to spend time verifying that
none of the existing test cases have fallen victim to it.
Updates golang/go#34738
Change-Id: Id2986e88c0e3585eaa7b45f33de97e1902847305
Reviewed-on: https://go-review.googlesource.com/c/build/+/199817
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-10-08 20:08:27 +03:00
|
|
|
// builder may end in "@go1.N" or "@1.N" (as alias for "@release-branch.go1.N") or "@branch-name".
|
|
|
|
// repo (other than "go") may end in "@go1.N" or "@1.N" (as alias for "@release-branch.go1.N").
|
2019-03-07 20:44:41 +03:00
|
|
|
b := func(builder, repo string) builderAndRepo {
|
|
|
|
br := builderAndRepo{
|
|
|
|
testName: builder + "," + repo,
|
|
|
|
builder: builder,
|
|
|
|
goBranch: "master",
|
|
|
|
repo: repo,
|
|
|
|
branch: "master",
|
|
|
|
}
|
|
|
|
if strings.Contains(builder, "@") {
|
|
|
|
f := strings.SplitN(builder, "@", 2)
|
|
|
|
br.builder = f[0]
|
|
|
|
br.goBranch = f[1]
|
|
|
|
}
|
|
|
|
if strings.Contains(repo, "@") {
|
|
|
|
f := strings.SplitN(repo, "@", 2)
|
|
|
|
br.repo = f[0]
|
|
|
|
br.branch = f[1]
|
dashboard: catch potential pitfall in TestBuilderConfig
Previously, it was possible to accidentally try to specify the
branch name for the Go repository by writing something like:
{b("nacl-386", "go@go1.13"), none},
That looks like it would test the right thing,
but in reality it would be equivalent to:
{b("nacl-386@master", "go"), none},
Because the branch of the builder always overwrites the branch
of the "go" repository.
This is not intuitive and easy to miss when reviewing or reading
the code.
Add a check that detects and panics on this b() API pitfall,
so that it is not accidentally introduced in the future, and
so that code readers don't need to spend time verifying that
none of the existing test cases have fallen victim to it.
Updates golang/go#34738
Change-Id: Id2986e88c0e3585eaa7b45f33de97e1902847305
Reviewed-on: https://go-review.googlesource.com/c/build/+/199817
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-10-08 20:08:27 +03:00
|
|
|
if br.repo == "go" {
|
|
|
|
panic(fmt.Errorf(`b(%q, %q): for "go" repo, must use the @%s suffix on the builder, not on the repo`, builder, repo, br.branch))
|
|
|
|
}
|
2019-03-07 20:44:41 +03:00
|
|
|
}
|
|
|
|
expandBranch := func(s *string) {
|
|
|
|
if strings.HasPrefix(*s, "go1.") {
|
|
|
|
*s = "release-branch." + *s
|
|
|
|
} else if strings.HasPrefix(*s, "1.") {
|
|
|
|
*s = "release-branch.go" + *s
|
|
|
|
}
|
2019-03-01 05:12:29 +03:00
|
|
|
}
|
2019-03-07 20:44:41 +03:00
|
|
|
expandBranch(&br.branch)
|
|
|
|
expandBranch(&br.goBranch)
|
|
|
|
if br.repo == "go" {
|
|
|
|
br.branch = br.goBranch
|
|
|
|
}
|
|
|
|
return br
|
2019-03-01 05:12:29 +03:00
|
|
|
}
|
|
|
|
tests := []struct {
|
2019-03-07 20:44:41 +03:00
|
|
|
br builderAndRepo
|
2021-05-08 00:26:04 +03:00
|
|
|
want want // none, both, or onlyPost.
|
2019-03-01 05:12:29 +03:00
|
|
|
}{
|
2019-03-07 20:44:41 +03:00
|
|
|
{b("linux-amd64", "go"), both},
|
|
|
|
{b("linux-amd64", "net"), both},
|
|
|
|
{b("linux-amd64", "sys"), both},
|
2019-05-16 23:04:34 +03:00
|
|
|
{b("linux-amd64", "website"), both},
|
2019-03-07 20:44:41 +03:00
|
|
|
|
2019-03-11 07:20:46 +03:00
|
|
|
// Don't test all subrepos on all the builders.
|
|
|
|
{b("linux-amd64-ssacheck", "net"), none},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-amd64-ssacheck@go1.99", "net"), none},
|
2020-10-07 18:24:42 +03:00
|
|
|
{b("linux-386-softfloat", "crypto"), onlyPost},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-386-softfloat@go1.99", "crypto"), onlyPost},
|
2020-01-10 23:53:25 +03:00
|
|
|
|
2022-05-21 00:26:59 +03:00
|
|
|
{b("android-amd64-emu", "go"), onlyPost},
|
2022-02-16 07:54:15 +03:00
|
|
|
{b("android-amd64-emu", "mobile"), both},
|
2022-05-21 00:26:59 +03:00
|
|
|
{b("android-amd64-emu", "crypto"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "net"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "sync"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "sys"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "text"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "time"), onlyPost},
|
|
|
|
{b("android-amd64-emu", "tools"), onlyPost},
|
2019-08-29 16:22:13 +03:00
|
|
|
{b("android-amd64-emu", "website"), none},
|
2019-03-07 20:44:41 +03:00
|
|
|
|
|
|
|
{b("android-386-emu", "go"), onlyPost},
|
|
|
|
{b("android-386-emu", "mobile"), onlyPost},
|
2022-05-21 00:26:59 +03:00
|
|
|
{b("android-386-emu", "crypto"), onlyPost},
|
2019-03-07 20:44:41 +03:00
|
|
|
|
|
|
|
{b("linux-amd64", "net"), both},
|
|
|
|
|
2021-09-02 10:51:28 +03:00
|
|
|
{b("linux-loong64-3a5000", "go"), onlyPost},
|
2022-12-29 01:56:57 +03:00
|
|
|
{b("linux-loong64-3a5000@go1.99", "go"), onlyPost},
|
|
|
|
{b("linux-loong64-3a5000@go1.18", "go"), none}, // Go 1.18 doesn't support this port.
|
2021-09-02 10:51:28 +03:00
|
|
|
{b("linux-loong64-3a5000", "sys"), onlyPost},
|
2022-12-29 01:56:57 +03:00
|
|
|
{b("linux-loong64-3a5000@go1.99", "sys"), onlyPost},
|
|
|
|
{b("linux-loong64-3a5000@go1.18", "sys"), none},
|
2021-09-02 10:51:28 +03:00
|
|
|
{b("linux-loong64-3a5000", "net"), onlyPost},
|
|
|
|
|
2023-01-03 18:42:02 +03:00
|
|
|
// OpenBSD 7.2.
|
|
|
|
{b("openbsd-amd64-72", "go"), both},
|
|
|
|
{b("openbsd-amd64-72@go1.99", "go"), both},
|
2020-11-10 20:56:57 +03:00
|
|
|
|
2021-11-19 00:33:40 +03:00
|
|
|
// FreeBSD 13.0
|
|
|
|
{b("freebsd-amd64-13_0", "go"), onlyPost},
|
|
|
|
{b("freebsd-amd64-13_0", "net"), onlyPost},
|
|
|
|
{b("freebsd-amd64-13_0", "mobile"), none},
|
|
|
|
{b("freebsd-386-13_0", "go"), onlyPost},
|
|
|
|
{b("freebsd-386-13_0", "net"), onlyPost},
|
|
|
|
{b("freebsd-386-13_0", "mobile"), none},
|
|
|
|
|
2022-01-10 23:09:53 +03:00
|
|
|
// FreeBSD 12.3
|
|
|
|
{b("freebsd-amd64-12_3", "go"), both},
|
|
|
|
{b("freebsd-amd64-12_3", "net"), both},
|
|
|
|
{b("freebsd-amd64-12_3", "mobile"), none},
|
|
|
|
{b("freebsd-386-12_3", "go"), onlyPost},
|
|
|
|
{b("freebsd-386-12_3", "net"), onlyPost},
|
|
|
|
{b("freebsd-386-12_3", "mobile"), none},
|
2021-04-23 18:33:51 +03:00
|
|
|
|
2019-05-01 01:37:31 +03:00
|
|
|
// NetBSD
|
2022-11-15 19:17:14 +03:00
|
|
|
{b("netbsd-amd64-9_3", "go"), onlyPost},
|
|
|
|
{b("netbsd-amd64-9_3", "net"), onlyPost},
|
|
|
|
{b("netbsd-amd64-9_3", "sys"), both},
|
|
|
|
{b("netbsd-386-9_3", "go"), onlyPost},
|
|
|
|
{b("netbsd-386-9_3", "net"), onlyPost},
|
2019-05-01 01:37:31 +03:00
|
|
|
|
2022-10-28 21:17:45 +03:00
|
|
|
// AIX
|
2019-03-13 11:29:15 +03:00
|
|
|
{b("aix-ppc64", "go"), onlyPost},
|
|
|
|
{b("aix-ppc64", "net"), onlyPost},
|
2019-06-04 11:14:55 +03:00
|
|
|
{b("aix-ppc64", "mobile"), none},
|
|
|
|
{b("aix-ppc64", "exp"), none},
|
2019-10-14 12:31:13 +03:00
|
|
|
{b("aix-ppc64", "term"), onlyPost},
|
2019-03-13 11:29:15 +03:00
|
|
|
|
2019-03-11 07:20:46 +03:00
|
|
|
{b("linux-amd64-nocgo", "mobile"), none},
|
|
|
|
|
2019-05-01 23:28:43 +03:00
|
|
|
// Virtual mobiledevices
|
2021-05-08 00:26:04 +03:00
|
|
|
{b("ios-arm64-corellium", "go"), onlyPost},
|
|
|
|
{b("android-arm64-corellium", "go"), onlyPost},
|
|
|
|
{b("android-arm-corellium", "go"), onlyPost},
|
2019-05-01 21:33:26 +03:00
|
|
|
|
2020-10-03 12:37:07 +03:00
|
|
|
// Mobile builders that run with GOOS=linux/ios and have
|
2019-03-12 19:21:55 +03:00
|
|
|
// a device attached.
|
|
|
|
{b("linux-amd64-androidemu", "mobile"), both},
|
|
|
|
|
2022-05-21 00:26:59 +03:00
|
|
|
// The Android emulator builders can test all repos.
|
2021-05-08 00:26:04 +03:00
|
|
|
{b("android-amd64-emu", "mobile"), both},
|
|
|
|
{b("android-386-emu", "mobile"), onlyPost},
|
2022-05-21 00:26:59 +03:00
|
|
|
{b("android-amd64-emu", "net"), onlyPost},
|
2021-05-08 00:26:04 +03:00
|
|
|
{b("android-386-emu", "net"), onlyPost},
|
2022-05-21 00:26:59 +03:00
|
|
|
{b("android-amd64-emu", "go"), onlyPost},
|
2021-05-08 00:26:04 +03:00
|
|
|
{b("android-386-emu", "go"), onlyPost},
|
2019-03-11 07:20:46 +03:00
|
|
|
|
2019-03-11 21:49:56 +03:00
|
|
|
// Only test tip for js/wasm, and only for some repos:
|
2019-03-11 07:20:46 +03:00
|
|
|
{b("js-wasm", "go"), both},
|
2019-03-11 21:49:56 +03:00
|
|
|
{b("js-wasm", "arch"), onlyPost},
|
|
|
|
{b("js-wasm", "crypto"), onlyPost},
|
|
|
|
{b("js-wasm", "sys"), onlyPost},
|
2019-03-11 07:20:46 +03:00
|
|
|
{b("js-wasm", "net"), onlyPost},
|
2019-03-11 21:49:56 +03:00
|
|
|
{b("js-wasm", "benchmarks"), none},
|
|
|
|
{b("js-wasm", "debug"), none},
|
|
|
|
{b("js-wasm", "mobile"), none},
|
|
|
|
{b("js-wasm", "perf"), none},
|
|
|
|
{b("js-wasm", "talks"), none},
|
|
|
|
{b("js-wasm", "tools"), none},
|
|
|
|
{b("js-wasm", "tour"), none},
|
|
|
|
{b("js-wasm", "website"), none},
|
|
|
|
|
2022-09-08 15:03:49 +03:00
|
|
|
// Race builders. Linux for all, GCE builders for
|
2019-03-11 21:49:56 +03:00
|
|
|
// post-submit, and only post-submit for "go" for
|
|
|
|
// Darwin (limited resources).
|
|
|
|
{b("linux-amd64-race", "go"), both},
|
|
|
|
{b("linux-amd64-race", "net"), both},
|
|
|
|
{b("windows-amd64-race", "go"), onlyPost},
|
|
|
|
{b("windows-amd64-race", "net"), onlyPost},
|
|
|
|
{b("freebsd-amd64-race", "go"), onlyPost},
|
|
|
|
{b("freebsd-amd64-race", "net"), onlyPost},
|
|
|
|
{b("darwin-amd64-race", "go"), onlyPost},
|
|
|
|
{b("darwin-amd64-race", "net"), none},
|
|
|
|
|
|
|
|
// Long test.
|
|
|
|
{b("linux-amd64-longtest", "go"), onlyPost},
|
|
|
|
{b("linux-amd64-longtest", "net"), onlyPost},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-amd64-longtest@go1.99", "go"), both},
|
|
|
|
{b("linux-amd64-longtest@go1.99", "net"), none},
|
2019-10-28 23:16:36 +03:00
|
|
|
{b("windows-amd64-longtest", "go"), onlyPost},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("windows-amd64-longtest@go1.99", "go"), both},
|
2019-10-28 23:16:36 +03:00
|
|
|
{b("windows-amd64-longtest", "net"), onlyPost},
|
|
|
|
{b("windows-amd64-longtest", "exp"), onlyPost},
|
|
|
|
{b("windows-amd64-longtest", "mobile"), none},
|
2020-07-01 21:14:47 +03:00
|
|
|
{b("linux-386-longtest", "go"), onlyPost},
|
|
|
|
{b("linux-386-longtest", "net"), onlyPost},
|
|
|
|
{b("linux-386-longtest", "exp"), none},
|
|
|
|
{b("linux-386-longtest", "mobile"), none},
|
2019-03-14 23:35:32 +03:00
|
|
|
|
2019-04-05 08:26:05 +03:00
|
|
|
// Experimental exp repo runs in very few places.
|
2019-03-14 23:35:32 +03:00
|
|
|
{b("linux-amd64", "exp"), both},
|
2019-04-05 08:26:05 +03:00
|
|
|
{b("linux-amd64-race", "exp"), both},
|
|
|
|
{b("linux-amd64-longtest", "exp"), onlyPost},
|
2023-01-26 00:36:31 +03:00
|
|
|
{b("windows-386-2008", "exp"), none},
|
2019-04-05 08:26:05 +03:00
|
|
|
{b("windows-amd64-2016", "exp"), both},
|
2023-01-26 00:10:20 +03:00
|
|
|
{b("darwin-amd64-10_14", "exp"), none},
|
2019-11-19 17:55:01 +03:00
|
|
|
{b("darwin-amd64-10_15", "exp"), onlyPost},
|
2019-04-05 08:26:05 +03:00
|
|
|
// ... but not on most others:
|
2022-01-10 23:09:53 +03:00
|
|
|
{b("freebsd-386-12_3", "exp"), none},
|
|
|
|
{b("freebsd-amd64-12_3", "exp"), none},
|
2019-04-05 08:26:05 +03:00
|
|
|
{b("js-wasm", "exp"), none},
|
|
|
|
|
|
|
|
// exp is experimental; it doesn't test against release branches.
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-amd64@go1.99", "exp"), none},
|
2019-03-18 19:48:22 +03:00
|
|
|
|
2019-12-07 08:14:28 +03:00
|
|
|
// the build repo is only really useful for linux-amd64 (where we run it),
|
|
|
|
// and darwin-amd64 and perhaps windows-amd64 (for stuff like gomote).
|
|
|
|
// No need for any other operating systems to use it.
|
|
|
|
{b("linux-amd64", "build"), both},
|
|
|
|
{b("linux-amd64-longtest", "build"), onlyPost},
|
|
|
|
{b("windows-amd64-2016", "build"), both},
|
|
|
|
{b("darwin-amd64-10_14", "build"), none},
|
|
|
|
{b("darwin-amd64-10_15", "build"), onlyPost},
|
|
|
|
{b("linux-amd64-fedora", "build"), none},
|
|
|
|
{b("linux-amd64-clang", "build"), none},
|
|
|
|
{b("linux-amd64-sid", "build"), none},
|
2021-08-16 22:35:39 +03:00
|
|
|
{b("linux-amd64-bullseye", "build"), none},
|
2019-12-12 20:43:59 +03:00
|
|
|
{b("linux-amd64-nocgo", "build"), none},
|
|
|
|
{b("linux-386-longtest", "build"), none},
|
2022-03-02 01:13:09 +03:00
|
|
|
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-amd64", "vulndb"), both},
|
2022-03-02 01:13:09 +03:00
|
|
|
{b("linux-amd64-longtest", "vulndb"), onlyPost},
|
|
|
|
|
2019-12-12 20:43:59 +03:00
|
|
|
{b("js-wasm", "build"), none},
|
|
|
|
{b("android-386-emu", "build"), none},
|
|
|
|
{b("android-amd64-emu", "build"), none},
|
2019-12-07 08:14:28 +03:00
|
|
|
|
2019-11-19 17:55:01 +03:00
|
|
|
{b("darwin-amd64-10_15", "go"), onlyPost},
|
2023-01-26 00:10:20 +03:00
|
|
|
|
|
|
|
// Go 1.20 is the last release with macOS 10.14 support:
|
|
|
|
{b("darwin-amd64-10_14", "go"), none},
|
|
|
|
{b("darwin-amd64-10_14@go1.21", "go"), none},
|
|
|
|
{b("darwin-amd64-10_14@go1.20", "go"), onlyPost},
|
|
|
|
{b("darwin-amd64-10_14", "net"), none},
|
|
|
|
{b("darwin-amd64-10_14@go1.21", "net"), none},
|
|
|
|
{b("darwin-amd64-10_14@go1.20", "net"), onlyPost},
|
2019-04-03 07:45:29 +03:00
|
|
|
|
2019-04-18 22:33:19 +03:00
|
|
|
// plan9 only lived at master. We didn't support any past releases.
|
|
|
|
// But it's off for now as it's always failing.
|
|
|
|
{b("plan9-386", "go"), none}, // temporarily disabled
|
|
|
|
{b("plan9-386", "net"), none}, // temporarily disabled
|
2019-11-28 13:33:00 +03:00
|
|
|
{b("plan9-386", "exp"), none},
|
|
|
|
{b("plan9-386", "mobile"), none},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("plan9-386@go1.99", "go"), none},
|
|
|
|
{b("plan9-386@go1.99", "net"), none},
|
2021-04-05 21:42:05 +03:00
|
|
|
{b("plan9-amd64-0intro", "go"), onlyPost},
|
|
|
|
{b("plan9-amd64-0intro", "exp"), none},
|
|
|
|
{b("plan9-amd64-0intro", "mobile"), none},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("plan9-amd64-0intro@go1.99", "go"), none},
|
2021-04-05 21:42:05 +03:00
|
|
|
{b("plan9-amd64-0intro", "net"), onlyPost},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("plan9-amd64-0intro@go1.99", "net"), none},
|
2019-04-03 08:03:37 +03:00
|
|
|
{b("plan9-arm", "go"), onlyPost},
|
2019-11-28 13:33:00 +03:00
|
|
|
{b("plan9-arm", "exp"), none},
|
|
|
|
{b("plan9-arm", "mobile"), none},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("plan9-amd64-0intro@go1.99", "go"), none},
|
|
|
|
{b("plan9-amd64-0intro", "net"), onlyPost},
|
|
|
|
{b("plan9-amd64-0intro@go1.99", "net"), none},
|
2022-08-02 20:36:35 +03:00
|
|
|
{b("dragonfly-amd64-622", "go"), onlyPost},
|
|
|
|
{b("dragonfly-amd64-622", "net"), onlyPost},
|
2020-03-19 17:34:11 +03:00
|
|
|
|
|
|
|
{b("linux-amd64-staticlockranking", "go"), onlyPost},
|
2022-10-28 21:17:45 +03:00
|
|
|
{b("linux-amd64-staticlockranking@go1.19", "go"), onlyPost},
|
2020-03-19 17:34:11 +03:00
|
|
|
{b("linux-amd64-staticlockranking", "net"), none},
|
2020-12-22 00:08:53 +03:00
|
|
|
|
2023-01-24 23:25:27 +03:00
|
|
|
{b("linux-amd64-nounified", "go"), none},
|
|
|
|
{b("linux-amd64-nounified", "tools"), none},
|
2022-02-28 22:43:03 +03:00
|
|
|
{b("linux-amd64-nounified", "net"), none},
|
2023-01-24 23:25:27 +03:00
|
|
|
{b("linux-amd64-nounified@go1.20", "go"), both},
|
|
|
|
{b("linux-amd64-nounified@go1.20", "tools"), both},
|
|
|
|
{b("linux-amd64-nounified@go1.20", "net"), none},
|
2019-03-01 05:12:29 +03:00
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
2019-03-07 20:44:41 +03:00
|
|
|
t.Run(tt.br.testName, func(t *testing.T) {
|
2021-05-08 00:26:04 +03:00
|
|
|
// Require a want value that asserts both dimensions: try or not, post or not.
|
|
|
|
switch tt.want {
|
|
|
|
case none, both, onlyPost:
|
|
|
|
// OK.
|
|
|
|
default:
|
|
|
|
t.Fatalf("tt.want must be one of: none, both, or onlyPost")
|
|
|
|
}
|
|
|
|
|
2019-03-07 20:44:41 +03:00
|
|
|
bc, ok := Builders[tt.br.builder]
|
|
|
|
if !ok {
|
|
|
|
t.Fatalf("unknown builder %q", tt.br.builder)
|
|
|
|
}
|
|
|
|
gotPost := bc.BuildsRepoPostSubmit(tt.br.repo, tt.br.branch, tt.br.goBranch)
|
|
|
|
if tt.want&isBuilder != 0 && !gotPost {
|
|
|
|
t.Errorf("not a post-submit builder, but expected")
|
|
|
|
}
|
|
|
|
if tt.want¬Builder != 0 && gotPost {
|
|
|
|
t.Errorf("unexpectedly a post-submit builder")
|
|
|
|
}
|
|
|
|
|
|
|
|
gotTry := bc.BuildsRepoTryBot(tt.br.repo, tt.br.branch, tt.br.goBranch)
|
|
|
|
if tt.want&isTrybot != 0 && !gotTry {
|
|
|
|
t.Errorf("not trybot, but expected")
|
|
|
|
}
|
|
|
|
if tt.want¬Trybot != 0 && gotTry {
|
|
|
|
t.Errorf("unexpectedly a trybot")
|
|
|
|
}
|
|
|
|
|
|
|
|
if t.Failed() {
|
|
|
|
t.Logf("For: %+v", tt.br)
|
|
|
|
}
|
|
|
|
})
|
2019-03-01 05:12:29 +03:00
|
|
|
}
|
|
|
|
}
|
2019-03-01 19:54:25 +03:00
|
|
|
|
2019-03-07 20:44:41 +03:00
|
|
|
func TestHostConfigsAllUsed(t *testing.T) {
|
2022-07-29 19:16:23 +03:00
|
|
|
knownUnused := map[string]bool{}
|
2020-08-04 19:01:34 +03:00
|
|
|
|
|
|
|
used := make(map[string]bool)
|
2019-03-07 20:44:41 +03:00
|
|
|
for _, conf := range Builders {
|
|
|
|
used[conf.HostType] = true
|
2019-03-01 19:54:25 +03:00
|
|
|
}
|
2019-03-07 20:44:41 +03:00
|
|
|
for hostType := range Hosts {
|
2020-08-04 19:01:34 +03:00
|
|
|
if !used[hostType] && !knownUnused[hostType] {
|
|
|
|
t.Errorf("host type %q is not referenced from any build config", hostType)
|
|
|
|
}
|
|
|
|
if used[hostType] && knownUnused[hostType] {
|
|
|
|
t.Errorf("host type %q should not be listed in knownUnused since it's in use", hostType)
|
2019-03-07 20:44:41 +03:00
|
|
|
}
|
2019-03-01 19:54:25 +03:00
|
|
|
}
|
|
|
|
}
|
2019-03-11 21:49:56 +03:00
|
|
|
|
2021-11-16 20:42:29 +03:00
|
|
|
// Test that all specified builder owners are non-nil.
|
|
|
|
func TestBuilderOwners(t *testing.T) {
|
|
|
|
for host, config := range Hosts {
|
|
|
|
for i, p := range config.Owners {
|
|
|
|
if p == nil {
|
|
|
|
t.Errorf("dashboard.Hosts[%q].Owners[%d] is nil, want non-nil", host, i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-11 21:49:56 +03:00
|
|
|
// tests that goBranch is optional for repo == "go"
|
|
|
|
func TestBuildsRepoAtAllImplicitGoBranch(t *testing.T) {
|
|
|
|
builder := Builders["android-amd64-emu"]
|
|
|
|
got := builder.buildsRepoAtAll("go", "master", "")
|
|
|
|
if !got {
|
|
|
|
t.Error("got = false; want true")
|
|
|
|
}
|
|
|
|
}
|
2019-04-02 18:27:10 +03:00
|
|
|
|
|
|
|
func TestShouldRunDistTest(t *testing.T) {
|
|
|
|
type buildMode int
|
|
|
|
const (
|
|
|
|
tryMode buildMode = 0
|
|
|
|
postSubmit buildMode = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
tests := []struct {
|
|
|
|
builder string
|
|
|
|
test string
|
|
|
|
mode buildMode
|
|
|
|
want bool
|
|
|
|
}{
|
|
|
|
{"linux-amd64", "api", postSubmit, true},
|
|
|
|
{"linux-amd64", "api", tryMode, true},
|
2022-01-10 23:09:53 +03:00
|
|
|
{"freebsd-amd64-12_3", "api", postSubmit, true}, // freebsd-amd64-12_3 uses fasterTrybots policy, should still build.
|
|
|
|
{"freebsd-amd64-12_3", "api", tryMode, false}, // freebsd-amd64-12_3 uses fasterTrybots policy, should skip in try mode.
|
2019-04-02 18:27:10 +03:00
|
|
|
|
|
|
|
{"linux-amd64", "reboot", tryMode, true},
|
|
|
|
{"linux-amd64-race", "reboot", tryMode, false},
|
|
|
|
|
|
|
|
{"darwin-amd64-10_14", "test:foo", postSubmit, false},
|
|
|
|
{"darwin-amd64-10_14", "reboot", postSubmit, false},
|
|
|
|
{"darwin-amd64-10_14", "api", postSubmit, false},
|
|
|
|
{"darwin-amd64-10_14", "codewalk", postSubmit, false},
|
2019-11-19 17:55:01 +03:00
|
|
|
{"darwin-amd64-10_15", "test:foo", postSubmit, false},
|
2019-04-02 18:27:10 +03:00
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
bc, ok := Builders[tt.builder]
|
|
|
|
if !ok {
|
|
|
|
t.Errorf("unknown builder %q", tt.builder)
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
isTry := tt.mode == tryMode
|
|
|
|
if isTry && !bc.BuildsRepoTryBot("go", "master", "master") {
|
|
|
|
t.Errorf("builder %q is not a trybot, so can't run test %q in try mode", tt.builder, tt.test)
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
got := bc.ShouldRunDistTest(tt.test, isTry)
|
|
|
|
if got != tt.want {
|
|
|
|
t.Errorf("%q.ShouldRunDistTest(%q, try %v) = %v; want %v", tt.builder, tt.test, isTry, got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-09 23:48:08 +03:00
|
|
|
|
2019-10-16 09:02:29 +03:00
|
|
|
func TestSlowBotAliases(t *testing.T) {
|
|
|
|
for term, name := range slowBotAliases {
|
|
|
|
if name == "" {
|
|
|
|
// Empty string means known missing builder.
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
if _, ok := Builders[name]; !ok {
|
|
|
|
t.Errorf("slowbot term %q references unknown builder %q", term, name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
out, err := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), "tool", "dist", "list").Output()
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("dist list: %v", err)
|
|
|
|
}
|
|
|
|
ports := strings.Fields(string(out))
|
|
|
|
|
2023-01-04 23:46:55 +03:00
|
|
|
done := map[string]bool{}
|
2020-04-23 01:52:59 +03:00
|
|
|
|
2019-10-16 09:02:29 +03:00
|
|
|
var add bytes.Buffer
|
|
|
|
check := func(term string, isArch bool) {
|
|
|
|
if done[term] {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
done[term] = true
|
|
|
|
_, isBuilderName := Builders[term]
|
|
|
|
_, hasAlias := slowBotAliases[term]
|
|
|
|
if !isBuilderName && !hasAlias {
|
|
|
|
prefix := term
|
|
|
|
if isArch {
|
|
|
|
prefix = "linux-" + term
|
|
|
|
}
|
|
|
|
var matches []string
|
|
|
|
for name := range Builders {
|
|
|
|
if strings.HasPrefix(name, prefix) {
|
|
|
|
matches = append(matches, name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sort.Strings(matches)
|
|
|
|
t.Errorf("term %q has no match in slowBotAliases", term)
|
|
|
|
if len(matches) == 1 {
|
|
|
|
fmt.Fprintf(&add, "%q: %q,\n", term, matches[0])
|
|
|
|
} else if len(matches) > 1 {
|
|
|
|
t.Errorf("maybe add: %q: %q, (matches=%q)", term, matches[len(matches)-1], matches)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, port := range ports {
|
|
|
|
slash := strings.IndexByte(port, '/')
|
|
|
|
if slash == -1 {
|
|
|
|
t.Fatalf("unexpected port %q", port)
|
|
|
|
}
|
|
|
|
goos, goarch := port[:slash], port[slash+1:]
|
|
|
|
check(goos+"-"+goarch, false)
|
|
|
|
check(goos, false)
|
|
|
|
check(goarch, true)
|
|
|
|
}
|
|
|
|
|
|
|
|
if add.Len() > 0 {
|
|
|
|
t.Errorf("Missing items from slowBotAliases:\n%s", add.String())
|
|
|
|
}
|
|
|
|
}
|
2019-10-19 05:49:53 +03:00
|
|
|
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
// TestTryBotsCompileAllPorts verifies that each port (go tool dist list)
|
|
|
|
// is covered by either a real TryBot or a misc-compile TryBot.
|
|
|
|
//
|
|
|
|
// The special pseudo-port 'linux-arm-arm5' is tested in TestMiscCompileLinuxGOARM5.
|
2019-11-07 16:15:55 +03:00
|
|
|
func TestTryBotsCompileAllPorts(t *testing.T) {
|
|
|
|
out, err := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), "tool", "dist", "list").Output()
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("dist list: %v", err)
|
|
|
|
}
|
|
|
|
ports := strings.Fields(string(out))
|
|
|
|
|
2021-04-23 21:08:15 +03:00
|
|
|
// knownMissing tracks Go ports that that are known to be
|
|
|
|
// completely missing TryBot (pre-submit) test coverage.
|
|
|
|
//
|
2021-04-27 22:33:27 +03:00
|
|
|
// All completed ports should have either a real TryBot or at least a misc-compile TryBot,
|
2021-04-23 21:08:15 +03:00
|
|
|
// so this map is meant to be used to temporarily fix tests
|
|
|
|
// when the work of adding a new port is actively underway.
|
2023-01-27 16:53:37 +03:00
|
|
|
knownMissing := map[string]bool{
|
|
|
|
"openbsd-mips64": true, // go.dev/issue/58110
|
|
|
|
}
|
2021-04-23 21:08:15 +03:00
|
|
|
|
|
|
|
var done = make(map[string]bool)
|
2019-11-07 16:15:55 +03:00
|
|
|
check := func(goos, goarch string) {
|
2020-09-28 18:04:35 +03:00
|
|
|
if goos == "android" || goos == "ios" {
|
2019-11-15 07:29:29 +03:00
|
|
|
// TODO(golang.org/issue/25963): support
|
2020-09-28 18:04:35 +03:00
|
|
|
// compilation-only Android and iOS trybots.
|
2019-11-15 07:29:29 +03:00
|
|
|
// buildall.bash doesn't set the environment
|
|
|
|
// up enough for e.g. compiling android-386
|
|
|
|
// from linux-amd64. (Issue #35596 too)
|
2020-09-28 18:04:35 +03:00
|
|
|
// iOS likely needs to be built on macOS
|
|
|
|
// with Xcode available.
|
2019-11-15 07:29:29 +03:00
|
|
|
return
|
|
|
|
}
|
2019-11-07 16:15:55 +03:00
|
|
|
goosArch := goos + "-" + goarch
|
|
|
|
if done[goosArch] {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for _, conf := range Builders {
|
2021-04-26 22:33:46 +03:00
|
|
|
if conf.GOOS() == goos && conf.GOARCH() == goarch &&
|
|
|
|
conf.BuildsRepoTryBot("go", "master", "master") {
|
2019-11-07 16:15:55 +03:00
|
|
|
|
2021-04-26 22:33:46 +03:00
|
|
|
// There's a real TryBot for this GOOS/GOARCH pair.
|
2019-11-07 16:15:55 +03:00
|
|
|
done[goosArch] = true
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
if strings.HasPrefix(conf.Name, "misc-compile-") {
|
|
|
|
re, err := regexp.Compile(conf.allScriptArgs[0])
|
|
|
|
if err != nil {
|
2021-04-26 22:33:46 +03:00
|
|
|
t.Fatalf("invalid misc-compile filtering pattern for builder %q: %q",
|
2019-11-07 16:15:55 +03:00
|
|
|
conf.Name, conf.allScriptArgs[0])
|
|
|
|
}
|
2021-04-26 22:33:46 +03:00
|
|
|
if re.MatchString(goosArch) {
|
|
|
|
// There's a misc-compile TryBot for this GOOS/GOARCH pair.
|
2019-11-07 16:15:55 +03:00
|
|
|
done[goosArch] = true
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-23 21:08:15 +03:00
|
|
|
if knownMissing[goosArch] && done[goosArch] {
|
|
|
|
// Make it visible when a builder is added but the old
|
|
|
|
// knownMissing entry isn't removed by failing the test.
|
|
|
|
t.Errorf("knownMissing[%q] is true, but a corresponding TryBot (real or misc-compile) exists", goosArch)
|
|
|
|
} else if _, ok := done[goosArch]; !ok && !knownMissing[goosArch] {
|
|
|
|
t.Errorf("missing real TryBot or misc-compile TryBot for %q", goosArch)
|
2019-11-07 16:15:55 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, port := range ports {
|
|
|
|
slash := strings.IndexByte(port, '/')
|
|
|
|
if slash == -1 {
|
|
|
|
t.Fatalf("unexpected port %q", port)
|
|
|
|
}
|
|
|
|
check(port[:slash], port[slash+1:])
|
|
|
|
}
|
|
|
|
}
|
2019-11-19 17:55:01 +03:00
|
|
|
|
dashboard: include at most 3 ports per misc-compile TryBot
Between Go 1.15, 1.16 and tip, the following 29 ports don't have
a real TryBot and instead rely on misc-compile TryBots for their
pre-submit coverage:
• aix/ppc64
• darwin/amd64
• darwin/arm64
• dragonfly/amd64
• freebsd/386
• freebsd/arm
• freebsd/arm64
• illumos/amd64
• linux/mips
• linux/mips64
• linux/mipsle
• linux/mips64le
• linux/ppc64
• linux/ppc64le
• linux/riscv64
• linux/s390x
• netbsd/386
• netbsd/amd64
• netbsd/arm
• netbsd/arm64
• openbsd/386
• openbsd/arm
• openbsd/arm64
• openbsd/mips64
• plan9/386
• plan9/amd64
• plan9/arm
• solaris/amd64
• windows/arm
The previous approach for misc-compile target selection was to break
them up primarily by GOOS value. However, as new architectures were
added over time, some misc-compile TryBots got to a point where they
were testing upwards of 5 ports (for example, misc-compile-openbsd
was testing 386, amd64, arm, arm64, and mips64 architectures).
Since each port is tested sequentially, allocating too many to one
misc-compile TryBot can cause it to become the bottleneck of an
entire TryBot run, exceeding the 10 minute completion time goal.
Arrange it so misc-compile TryBot target selection is done explicitly
in x/build, and pick 3 as max number of targets per TryBot for now.
Based on recent timing observations, that should strike a decent balance
between resource use (spinning up a builder) vs chance of a misc-compile
TryBot becoming a bottleneck. It will also give us an opportunity to
compare timing of 1, 2 and 3 targets per misc-compile in the future.
(When we start tracking timing for TryBot completion time holistically,
we'll be in a better position to refine this strategy further.)
Making misc-compile target selection explicit in x/build also enables
removing unnecessary duplicate misc-compile coverage from ports that
already have a real TryBot (for example, openbsd/amd64 was previously
tested via both the openbsd-amd64-68 TryBot and misc-compile-openbsd).
This shouldn't be needed, so it's no longer done.
For golang/go#17104.
Fixes golang/go#32632.
Change-Id: Iac918377b91af3e48780b38ffdf3153e213eeba2
Reviewed-on: https://go-review.googlesource.com/c/build/+/313210
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-23 23:56:37 +03:00
|
|
|
// The 'linux-arm-arm5' pseduo-port is supported by src/buildall.bash
|
|
|
|
// and tests linux/arm with GOARM=5 set. Since it's not a normal port,
|
|
|
|
// the TestTryBotsCompileAllPorts wouldn't report if the misc-compile
|
|
|
|
// TryBot that covers is is accidentally removed. Check it explicitly.
|
|
|
|
func TestMiscCompileLinuxGOARM5(t *testing.T) {
|
|
|
|
var ok bool
|
|
|
|
for _, b := range Builders {
|
|
|
|
if !strings.HasPrefix(b.Name, "misc-compile-") {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
re, err := regexp.Compile(b.allScriptArgs[0])
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("invalid misc-compile filtering pattern for builder %q: %q",
|
|
|
|
b.Name, b.allScriptArgs[0])
|
|
|
|
}
|
|
|
|
if re.MatchString("linux-arm-arm5") {
|
|
|
|
ok = true
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !ok {
|
|
|
|
// We get here if the linux-arm-arm5 port is no longer checked by
|
|
|
|
// a misc-compile TryBot. Report it as a failure in case the coverage
|
|
|
|
// was removed accidentally (e.g., as part of a refactor).
|
|
|
|
t.Errorf("no misc-compile TryBot coverage for the special 'linux-arm-arm5' pseudo-port")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-10 01:12:41 +03:00
|
|
|
// Test that we have longtest builders and
|
|
|
|
// that their environment configurations are okay.
|
2020-05-13 21:30:25 +03:00
|
|
|
func TestLongTestBuilder(t *testing.T) {
|
2022-11-10 01:12:41 +03:00
|
|
|
for _, name := range []string{"linux-amd64-longtest", "linux-amd64-longtest-race"} {
|
|
|
|
name := name
|
|
|
|
t.Run(name, func(t *testing.T) {
|
|
|
|
long, ok := Builders[name]
|
|
|
|
if !ok {
|
|
|
|
t.Fatalf("we don't have a %s builder anymore, is that intentional?", name)
|
|
|
|
}
|
|
|
|
if !long.IsLongTest() {
|
|
|
|
t.Errorf("the %s builder isn't a longtest builder, is that intentional?", name)
|
|
|
|
}
|
|
|
|
var shortDisabled bool
|
|
|
|
for _, e := range long.Env() {
|
|
|
|
if e == "GO_TEST_SHORT=0" {
|
|
|
|
shortDisabled = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !shortDisabled {
|
|
|
|
t.Errorf("the %s builder doesn't set GO_TEST_SHORT=0, is that intentional?", name)
|
|
|
|
}
|
|
|
|
})
|
2020-05-13 21:30:25 +03:00
|
|
|
}
|
2022-11-10 01:12:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Test that we have race builders and
|
|
|
|
// that their environment configurations are okay.
|
|
|
|
func TestRaceBuilder(t *testing.T) {
|
|
|
|
for _, name := range []string{"linux-amd64-race", "linux-amd64-longtest-race"} {
|
|
|
|
name := name
|
|
|
|
t.Run(name, func(t *testing.T) {
|
|
|
|
race, ok := Builders[name]
|
|
|
|
if !ok {
|
|
|
|
t.Fatalf("we don't have a %s builder anymore, is that intentional?", name)
|
|
|
|
}
|
|
|
|
if !race.IsRace() {
|
|
|
|
t.Errorf("the %s builder isn't a race builder, is that intentional?", name)
|
|
|
|
}
|
|
|
|
if script := race.AllScript(); !strings.Contains(script, "race") {
|
|
|
|
t.Errorf("the %s builder doesn't use race.bash or race.bat, it uses %s instead, is that intentional?", name, script)
|
|
|
|
}
|
|
|
|
})
|
2020-05-13 21:30:25 +03:00
|
|
|
}
|
|
|
|
}
|
2020-08-18 20:32:05 +03:00
|
|
|
|
|
|
|
func TestHostConfigIsVM(t *testing.T) {
|
|
|
|
testCases := []struct {
|
|
|
|
desc string
|
|
|
|
config *HostConfig
|
|
|
|
want bool
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
desc: "non-ec2-vm",
|
|
|
|
config: &HostConfig{
|
|
|
|
VMImage: "image-x",
|
|
|
|
ContainerImage: "",
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
want: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "non-ec2-container",
|
|
|
|
config: &HostConfig{
|
|
|
|
VMImage: "",
|
|
|
|
ContainerImage: "container-image-x",
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
want: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "ec2-container",
|
|
|
|
config: &HostConfig{
|
|
|
|
VMImage: "image-x",
|
|
|
|
ContainerImage: "container-image-x",
|
|
|
|
isEC2: true,
|
|
|
|
},
|
|
|
|
want: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "ec2-vm",
|
|
|
|
config: &HostConfig{
|
|
|
|
VMImage: "image-x",
|
|
|
|
ContainerImage: "",
|
|
|
|
isEC2: true,
|
|
|
|
},
|
|
|
|
want: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
|
|
t.Run(fmt.Sprintf(tc.desc), func(t *testing.T) {
|
|
|
|
if got := tc.config.IsVM(); got != tc.want {
|
|
|
|
t.Errorf("HostConfig.IsVM() = %t; want %t", got, tc.want)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2020-08-20 18:53:58 +03:00
|
|
|
|
|
|
|
func TestModulesEnv(t *testing.T) {
|
|
|
|
testCases := []struct {
|
|
|
|
desc string
|
|
|
|
buildConfig *BuildConfig
|
|
|
|
repo string
|
|
|
|
want []string
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
desc: "ec2-builder-repo-non-go",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: false,
|
|
|
|
isEC2: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "bar",
|
|
|
|
want: []string{"GOPROXY=https://proxy.golang.org"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "reverse-builder-repo-non-go",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: true,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "bar",
|
|
|
|
want: []string{"GOPROXY=https://proxy.golang.org"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "reverse-builder-repo-go",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: true,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "go",
|
|
|
|
want: []string{"GOPROXY=off"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "builder-repo-go",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: false,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "go",
|
|
|
|
want: []string{"GOPROXY=off"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "builder-repo-go-outbound-network-allowed",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
Name: "test-longtest",
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: false,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "go",
|
|
|
|
want: nil,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "builder-repo-special-case",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: false,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "build",
|
|
|
|
want: []string{"GO111MODULE=on"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "reverse-builder-repo-special-case",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: true,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "build",
|
|
|
|
want: []string{"GOPROXY=https://proxy.golang.org", "GO111MODULE=on"},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
desc: "builder-repo-non-special-case",
|
|
|
|
buildConfig: &BuildConfig{
|
|
|
|
testHostConf: &HostConfig{
|
|
|
|
IsReverse: false,
|
|
|
|
isEC2: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
repo: "bar",
|
|
|
|
want: nil,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
|
|
t.Run(tc.desc, func(t *testing.T) {
|
|
|
|
got := tc.buildConfig.ModulesEnv(tc.repo)
|
|
|
|
if diff := cmp.Diff(tc.want, got); diff != "" {
|
|
|
|
t.Errorf("BuildConfig.ModulesEnv(%q) mismatch (-want, +got)\n%s", tc.repo, diff)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2022-01-07 23:29:05 +03:00
|
|
|
|
|
|
|
func TestDefaultPlusExpBuild(t *testing.T) {
|
|
|
|
for _, tc := range []struct {
|
|
|
|
repo string
|
|
|
|
want bool
|
|
|
|
}{
|
|
|
|
{"exp", true},
|
|
|
|
{"build", true},
|
|
|
|
{"anything", true},
|
|
|
|
{"vulndb", false},
|
|
|
|
} {
|
|
|
|
got := defaultPlusExpBuild(tc.repo, "", "")
|
|
|
|
if got != tc.want {
|
|
|
|
t.Errorf("%s: got %t, want %t", tc.repo, got, tc.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-26 19:05:33 +03:00
|
|
|
|
|
|
|
func TestHostsSort(t *testing.T) {
|
|
|
|
data, err := os.ReadFile("builders.go")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
table := regexp.MustCompile(`(?s)\nvar Hosts =.*?\n}\n`).FindString(string(data))
|
|
|
|
if table == "" {
|
|
|
|
t.Fatal("cannot find Hosts table in builders.go")
|
|
|
|
}
|
|
|
|
m := regexp.MustCompile(`\n\t"([^"]+)":`).FindAllStringSubmatch(table, -1)
|
|
|
|
if len(m) < 10 {
|
|
|
|
t.Fatalf("cannot find host keys in table")
|
|
|
|
}
|
|
|
|
var last string
|
|
|
|
for _, sub := range m {
|
|
|
|
key := sub[1]
|
|
|
|
if last > key {
|
|
|
|
t.Errorf("Host table unsorted: %s before %s", last, key)
|
|
|
|
}
|
|
|
|
last = key
|
|
|
|
}
|
|
|
|
}
|
2022-11-01 23:57:01 +03:00
|
|
|
|
|
|
|
func TestHostConfigCosArchitecture(t *testing.T) {
|
|
|
|
testCases := []struct {
|
|
|
|
desc string
|
|
|
|
hostConfig HostConfig
|
|
|
|
want CosArch
|
|
|
|
}{
|
|
|
|
{"default", HostConfig{}, CosArchAMD64},
|
|
|
|
{"amd64", HostConfig{cosArchitecture: CosArchAMD64}, CosArchAMD64},
|
|
|
|
{"arm64", HostConfig{cosArchitecture: CosArchARM64}, CosArchARM64},
|
|
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
|
|
t.Run(tc.desc, func(t *testing.T) {
|
|
|
|
if got := tc.hostConfig.CosArchitecture(); got != tc.want {
|
|
|
|
t.Errorf("HostConfig.CosArchitecture() = %+v; want %+v", got, tc.want)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2022-11-23 17:32:27 +03:00
|
|
|
|
|
|
|
func TestWindowsCCSetup(t *testing.T) {
|
|
|
|
// For 1.18 + 1.19 we want to see the "-oldcc" variants,
|
|
|
|
// where for 1.20 and main branch we want the non-oldcc variants,
|
|
|
|
// both for trybots and post-submit testing.
|
|
|
|
tests := []struct {
|
|
|
|
repo string // "go", "net", etc
|
|
|
|
branch string // of repo
|
|
|
|
want string
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
repo: "go",
|
|
|
|
branch: "master",
|
|
|
|
want: "newcc",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "tools",
|
|
|
|
branch: "master",
|
|
|
|
want: "newcc",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "go",
|
|
|
|
branch: "go1.20",
|
|
|
|
want: "newcc",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "go",
|
|
|
|
branch: "go1.19",
|
|
|
|
want: "oldcc",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
repo: "build",
|
|
|
|
branch: "go1.19",
|
|
|
|
want: "oldcc",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
checkWindowsBuilders := func(got []*BuildConfig, want string, repo, branch string) {
|
|
|
|
t.Helper()
|
|
|
|
for _, b := range got {
|
|
|
|
bname := b.Name
|
|
|
|
if !strings.HasPrefix(bname, "windows-amd64") &&
|
|
|
|
!strings.HasPrefix(bname, "windows-386") {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
hasOldCC := strings.Contains(bname, "oldcc")
|
|
|
|
if want == "newcc" && hasOldCC {
|
|
|
|
t.Errorf("got unexpected oldcc builder %q repo %s branch %s",
|
|
|
|
bname, repo, branch)
|
|
|
|
} else if want == "oldcc" && !hasOldCC {
|
|
|
|
t.Errorf("got unexpected newcc builder %q repo %s branch %s",
|
|
|
|
bname, repo, branch)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for i, tt := range tests {
|
|
|
|
if tt.branch == "" || tt.repo == "" {
|
|
|
|
t.Errorf("incomplete test entry %d", i)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if tt.want != "newcc" && tt.want != "oldcc" {
|
|
|
|
t.Errorf("incorrect 'want' field in test entry %d", i)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
t.Run(fmt.Sprintf("%s/%s", tt.repo, tt.branch), func(t *testing.T) {
|
|
|
|
goBranch := tt.branch // hard-code the common case for now
|
|
|
|
got := TryBuildersForProject(tt.repo, tt.branch, goBranch)
|
|
|
|
checkWindowsBuilders(got, tt.want, tt.repo, tt.branch)
|
|
|
|
})
|
|
|
|
t.Run(fmt.Sprintf("%s/%s", tt.repo, tt.branch), func(t *testing.T) {
|
|
|
|
goBranch := tt.branch // hard-code the common case for now
|
|
|
|
got := buildersForProject(tt.repo, tt.branch, goBranch, (*BuildConfig).BuildsRepoPostSubmit)
|
|
|
|
checkWindowsBuilders(got, tt.want, tt.repo, tt.branch)
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|