feat(parser/diff): remove result status check
This commit is contained in:
parent
1ab6fa4583
commit
a001b26b66
|
@ -7,7 +7,6 @@ import (
|
|||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/criyle/go-judge/envexec"
|
||||
"github.com/joint-online-judge/JOJ3/internal/stage"
|
||||
)
|
||||
|
||||
|
@ -24,7 +23,6 @@ type Conf struct {
|
|||
PassComment string `default:"🥳Passed!\n"`
|
||||
FailComment string `default:"🧐Failed...\n"`
|
||||
Cases []struct {
|
||||
IgnoreResultStatus bool
|
||||
Outputs []struct {
|
||||
Score int
|
||||
FileName string
|
||||
|
@ -54,13 +52,6 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
result := results[i]
|
||||
score := 0
|
||||
comment := ""
|
||||
if !caseConf.IgnoreResultStatus &&
|
||||
result.Status != stage.Status(envexec.StatusAccepted) {
|
||||
forceQuit = true
|
||||
comment += fmt.Sprintf(
|
||||
"Unexpected executor status: %s.", result.Status,
|
||||
)
|
||||
} else {
|
||||
for _, output := range caseConf.Outputs {
|
||||
answer, err := os.ReadFile(output.AnswerPath)
|
||||
if err != nil {
|
||||
|
@ -101,7 +92,6 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
res = append(res, stage.ParserResult{
|
||||
Score: score,
|
||||
Comment: comment,
|
||||
|
|
Loading…
Reference in New Issue
Block a user