feat: support scoreboard & failed table path in conf

This commit is contained in:
张泊明518370910136 2024-10-07 16:26:40 -04:00
parent 1fe7e13c2c
commit 67e222aa59
GPG Key ID: D47306D7062CDA9D
2 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,8 @@ type Conf struct {
OutputPath string `default:"joj3_result.json"` OutputPath string `default:"joj3_result.json"`
GradingRepoName string `default:""` GradingRepoName string `default:""`
SkipTeapot bool `default:"true"` SkipTeapot bool `default:"true"`
ScoreboardPath string `default:"scoreboard.csv"`
FailedTablePath string `default:"failed-table.md"`
Stages []struct { Stages []struct {
Name string Name string
Group string Group string

View File

@ -29,7 +29,7 @@ func Run(conf conf.Conf) error {
repoName := repoParts[1] repoName := repoParts[1]
cmd := exec.Command("joint-teapot", "joj3-scoreboard", cmd := exec.Command("joint-teapot", "joj3-scoreboard",
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName, envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
runNumber) // #nosec G204 runNumber, conf.ScoreboardPath) // #nosec G204
output, err := cmd.CombinedOutput() output, err := cmd.CombinedOutput()
slog.Info("joint-teapot joj3-scoreboard", "output", string(output)) slog.Info("joint-teapot joj3-scoreboard", "output", string(output))
if err != nil { if err != nil {
@ -38,7 +38,7 @@ func Run(conf conf.Conf) error {
} }
cmd = exec.Command("joint-teapot", "joj3-failed-table", cmd = exec.Command("joint-teapot", "joj3-failed-table",
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName, envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
runNumber) // #nosec G204 runNumber, conf.FailedTablePath) // #nosec G204
output, err = cmd.CombinedOutput() output, err = cmd.CombinedOutput()
slog.Info("joint-teapot joj3-failed-table", "output", string(output)) slog.Info("joint-teapot joj3-failed-table", "output", string(output))
if err != nil { if err != nil {