Skip to content

Commit 59e4df6

Browse files
dmitshurgopherbot
authored andcommitted
dashboard: inline loong64 dist test and build repo policy functions
Having dedicated policy functions is helpful when many builders reuse them, but there's only one builder for the linux/loong64 port and its configuration is more builder-specific than architecture-specific. So inline them for now. Change-Id: I0d478226663d3d92d885920c44dc7801ca63670b Reviewed-on: https://go-review.googlesource.com/c/build/+/459875 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: abner chenc <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 1f2478a commit 59e4df6

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

dashboard/builders.go

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,12 +2820,25 @@ func init() {
28202820
},
28212821
})
28222822
addBuilder(BuildConfig{
2823-
FlakyNet: true,
2824-
HostType: "host-linux-loong64-3a5000",
2825-
Name: "linux-loong64-3a5000",
2826-
SkipSnapshot: true,
2827-
distTestAdjust: loong64DistTestPolicy,
2828-
buildsRepo: loong64BuildsRepoPolicy,
2823+
FlakyNet: true,
2824+
HostType: "host-linux-loong64-3a5000",
2825+
Name: "linux-loong64-3a5000",
2826+
SkipSnapshot: true,
2827+
distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
2828+
switch distTest {
2829+
case "api", "reboot":
2830+
return false
2831+
}
2832+
return run
2833+
},
2834+
buildsRepo: func(repo, branch, goBranch string) bool {
2835+
switch repo {
2836+
case "go", "net", "sys":
2837+
return branch == "master" && goBranch == "master"
2838+
default:
2839+
return false
2840+
}
2841+
},
28292842
privateGoProxy: true, // this builder is behind firewall
28302843
env: []string{
28312844
"GOARCH=loong64",
@@ -3208,25 +3221,6 @@ func mipsBuildsRepoPolicy(repo, branch, goBranch string) bool {
32083221
// riscvDistTestPolicy is same as mipsDistTestPolicy for now.
32093222
var riscvDistTestPolicy = mipsDistTestPolicy
32103223

3211-
// loong64DistTestPolicy is a distTestAdjust policy function
3212-
func loong64DistTestPolicy(run bool, distTest string, isNormalTry bool) bool {
3213-
switch distTest {
3214-
case "api", "reboot":
3215-
return false
3216-
}
3217-
return run
3218-
}
3219-
3220-
// loong64BuildsRepoPolicy is a buildsRepo policy function
3221-
func loong64BuildsRepoPolicy(repo, branch, goBranch string) bool {
3222-
switch repo {
3223-
case "go", "net", "sys":
3224-
return branch == "master" && goBranch == "master"
3225-
default:
3226-
return false
3227-
}
3228-
}
3229-
32303224
// TryBuildersForProject returns the builders that should run as part of
32313225
// a TryBot set for the given project.
32323226
// The project argument is of the form "go", "net", "sys", etc.

0 commit comments

Comments
 (0)