Skip to content

Commit

Permalink
dashboard: inline loong64 dist test and build repo policy functions
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dmitshur authored and gopherbot committed Jan 3, 2023
1 parent 1f2478a commit 59e4df6
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -2820,12 +2820,25 @@ func init() {
},
})
addBuilder(BuildConfig{
FlakyNet: true,
HostType: "host-linux-loong64-3a5000",
Name: "linux-loong64-3a5000",
SkipSnapshot: true,
distTestAdjust: loong64DistTestPolicy,
buildsRepo: loong64BuildsRepoPolicy,
FlakyNet: true,
HostType: "host-linux-loong64-3a5000",
Name: "linux-loong64-3a5000",
SkipSnapshot: true,
distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
switch distTest {
case "api", "reboot":
return false
}
return run
},
buildsRepo: func(repo, branch, goBranch string) bool {
switch repo {
case "go", "net", "sys":
return branch == "master" && goBranch == "master"
default:
return false
}
},
privateGoProxy: true, // this builder is behind firewall
env: []string{
"GOARCH=loong64",
Expand Down Expand Up @@ -3208,25 +3221,6 @@ func mipsBuildsRepoPolicy(repo, branch, goBranch string) bool {
// riscvDistTestPolicy is same as mipsDistTestPolicy for now.
var riscvDistTestPolicy = mipsDistTestPolicy

// loong64DistTestPolicy is a distTestAdjust policy function
func loong64DistTestPolicy(run bool, distTest string, isNormalTry bool) bool {
switch distTest {
case "api", "reboot":
return false
}
return run
}

// loong64BuildsRepoPolicy is a buildsRepo policy function
func loong64BuildsRepoPolicy(repo, branch, goBranch string) bool {
switch repo {
case "go", "net", "sys":
return branch == "master" && goBranch == "master"
default:
return false
}
}

// TryBuildersForProject returns the builders that should run as part of
// a TryBot set for the given project.
// The project argument is of the form "go", "net", "sys", etc.
Expand Down

0 comments on commit 59e4df6

Please sign in to comment.