feat(cmd/joj3): support max total score [force build]
All checks were successful
submodules sync / sync (push) Successful in 50s
build / build (push) Successful in 1m48s
build / trigger-build-image (push) Successful in 9s

This commit is contained in:
张泊明518370910136 2024-11-01 02:40:20 -04:00
parent 9d43539da7
commit 12f2c93fb8
GPG Key ID: D47306D7062CDA9D
2 changed files with 4 additions and 1 deletions

View File

@ -54,6 +54,7 @@ type Conf struct {
SkipScoreboard bool `default:"false"`
SkipFailedTable bool `default:"false"`
SubmitterInIssueTitle bool `default:"true"`
MaxTotalScore int `default:"-1"`
}
// TODO: remove the following backward compatibility fields
SandboxExecServer string `default:"localhost:5051"`

View File

@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"regexp"
"strconv"
"strings"
"sync"
@ -78,7 +79,8 @@ func Run(conf *conf.Conf, runID string) error {
"joj3-all", conf.Teapot.EnvFilePath, conf.Stage.OutputPath, actor,
conf.Teapot.GradingRepoName, repoName, runNumber,
conf.Teapot.ScoreboardPath, conf.Teapot.FailedTablePath,
conf.Name, sha, runID, skipIssueArg, skipScoreboardArg,
conf.Name, sha, runID, strconv.Itoa(conf.Teapot.MaxTotalScore),
skipIssueArg, skipScoreboardArg,
skipFailedTableArg, submitterInIssueTitleArg,
}); err != nil {
slog.Error("teapot exit", "error", err)