chore: re-organize examples

This commit is contained in:
张泊明518370910136 2024-03-31 17:03:08 -04:00
parent 6348a0807b
commit b82d6f48d9
GPG Key ID: D47306D7062CDA9D
11 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@ func TestMain(t *testing.T) {
name string name string
want []stage.StageResult want []stage.StageResult
}{ }{
{"success", []stage.StageResult{ {"compile/success", []stage.StageResult{
{Name: "compile", Results: []stage.ParserResult{ {Name: "compile", Results: []stage.ParserResult{
{Score: 0, Comment: ""}, {Score: 0, Comment: ""},
}}, }},
@ -53,17 +53,17 @@ func TestMain(t *testing.T) {
{Score: 100, Comment: "executor status: run time: \\d+ ns, memory: \\d+ bytes"}, {Score: 100, Comment: "executor status: run time: \\d+ ns, memory: \\d+ bytes"},
}}, }},
}}, }},
{"compile_error", []stage.StageResult{ {"compile/error", []stage.StageResult{
{Name: "compile", Results: []stage.ParserResult{ {Name: "compile", Results: []stage.ParserResult{
{Score: 0, Comment: "Unexpected executor status: Nonzero Exit Status\\."}, {Score: 0, Comment: "Unexpected executor status: Nonzero Exit Status\\."},
}}, }},
}}, }},
{"dummy", []stage.StageResult{ {"dummy/success", []stage.StageResult{
{Name: "dummy", Results: []stage.ParserResult{ {Name: "dummy", Results: []stage.ParserResult{
{Score: 110, Comment: "dummy comment \\+ comment from toml conf"}, {Score: 110, Comment: "dummy comment \\+ comment from toml conf"},
}}, }},
}}, }},
{"dummy_error", []stage.StageResult{ {"dummy/error", []stage.StageResult{
{Name: "dummy", Results: []stage.ParserResult{ {Name: "dummy", Results: []stage.ParserResult{
{Score: 0, Comment: "Unexpected executor status: Nonzero Exit Status\\.\\s*Stderr: dummy negative score: -1"}, {Score: 0, Comment: "Unexpected executor status: Nonzero Exit Status\\.\\s*Stderr: dummy negative score: -1"},
}}, }},

View File

@ -11,7 +11,7 @@ memoryLimit = 104_857_600
procLimit = 50 procLimit = 50
copyInCwd = true copyInCwd = true
[stages.executor.with.default.copyIn.dummy] [stages.executor.with.default.copyIn.dummy]
src = "./../../build/dummy" src = "./../../../build/dummy"
copyOut = ["stdout", "stderr"] copyOut = ["stdout", "stderr"]
[stages.executor.with.default.stdin] [stages.executor.with.default.stdin]
content = "" content = ""

View File

@ -11,7 +11,7 @@ memoryLimit = 104_857_600
procLimit = 50 procLimit = 50
copyInCwd = true copyInCwd = true
[stages.executor.with.default.copyIn.dummy] [stages.executor.with.default.copyIn.dummy]
src = "./../../build/dummy" src = "./../../../build/dummy"
copyOut = ["stdout", "stderr"] copyOut = ["stdout", "stderr"]
[stages.executor.with.default.stdin] [stages.executor.with.default.stdin]
content = "" content = ""