feat(cmd/joj3): support max total score [force build]
This commit is contained in:
		
							parent
							
								
									9d43539da7
								
							
						
					
					
						commit
						12f2c93fb8
					
				|  | @ -54,6 +54,7 @@ type Conf struct { | ||||||
| 		SkipScoreboard        bool   `default:"false"` | 		SkipScoreboard        bool   `default:"false"` | ||||||
| 		SkipFailedTable       bool   `default:"false"` | 		SkipFailedTable       bool   `default:"false"` | ||||||
| 		SubmitterInIssueTitle bool   `default:"true"` | 		SubmitterInIssueTitle bool   `default:"true"` | ||||||
|  | 		MaxTotalScore         int    `default:"-1"` | ||||||
| 	} | 	} | ||||||
| 	// TODO: remove the following backward compatibility fields
 | 	// TODO: remove the following backward compatibility fields
 | ||||||
| 	SandboxExecServer string `default:"localhost:5051"` | 	SandboxExecServer string `default:"localhost:5051"` | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ import ( | ||||||
| 	"os" | 	"os" | ||||||
| 	"os/exec" | 	"os/exec" | ||||||
| 	"regexp" | 	"regexp" | ||||||
|  | 	"strconv" | ||||||
| 	"strings" | 	"strings" | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
|  | @ -78,7 +79,8 @@ func Run(conf *conf.Conf, runID string) error { | ||||||
| 		"joj3-all", conf.Teapot.EnvFilePath, conf.Stage.OutputPath, actor, | 		"joj3-all", conf.Teapot.EnvFilePath, conf.Stage.OutputPath, actor, | ||||||
| 		conf.Teapot.GradingRepoName, repoName, runNumber, | 		conf.Teapot.GradingRepoName, repoName, runNumber, | ||||||
| 		conf.Teapot.ScoreboardPath, conf.Teapot.FailedTablePath, | 		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, | 		skipFailedTableArg, submitterInIssueTitleArg, | ||||||
| 	}); err != nil { | 	}); err != nil { | ||||||
| 		slog.Error("teapot exit", "error", err) | 		slog.Error("teapot exit", "error", err) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user