fix: cases specific numerics remove when unecessary
All checks were successful
build / build (push) Successful in 1m43s
build / build (pull_request) Successful in 1m22s

This commit is contained in:
李衍志523370910113 2025-05-22 14:59:50 +08:00
parent ca63a94238
commit 927e5ce95d
3 changed files with 21 additions and 29 deletions

View File

@ -200,11 +200,12 @@ def fix_diff(
)
if cmd.args == executor.with_.default.args:
cmd.args = None
if cmd.cpu_limit == executor.with_.default.cpu_limit:
# duplicate with the fallback case in executor.with_
if cmd.cpu_limit == const.DEFAULT_CPU_LIMIT:
cmd.cpu_limit = None
if cmd.clock_limit == executor.with_.default.clock_limit:
if cmd.clock_limit == 2 * const.DEFAULT_CPU_LIMIT:
cmd.clock_limit = None
if cmd.memory_limit == executor.with_.default.memory_limit:
if cmd.memory_limit == const.DEFAULT_MEMORY_LIMIT:
cmd.memory_limit = None
if cmd.proc_limit == executor.with_.default.proc_limit:
cmd.proc_limit = None
@ -224,18 +225,11 @@ def fix_diff(
parser_cases.append(parser_case)
for case in default_cases:
cmd = result.OptionalCmd(
stdin=result.LocalFile(src=str(base_dir / f"{case}.in"))
stdin=result.LocalFile(src=str(base_dir / f"{case}.in")),
cpu_limit=None,
clock_limit=None,
memory_limit=None,
)
if cmd.args == executor.with_.default.args:
cmd.args = None
if cmd.cpu_limit == executor.with_.default.cpu_limit:
cmd.cpu_limit = None
if cmd.clock_limit == executor.with_.default.clock_limit:
cmd.clock_limit = None
if cmd.memory_limit == executor.with_.default.memory_limit:
cmd.memory_limit = None
if cmd.proc_limit == executor.with_.default.proc_limit:
cmd.proc_limit = None
stage_cases.append(cmd)
parser_case = result.DiffCasesConfig(
outputs=[

View File

@ -26,17 +26,17 @@
],
"stdout": {
"name": "stdout",
"max": 33554432,
"max": 10485760,
"pipe": true
},
"stderr": {
"name": "stderr",
"max": 33554432,
"max": 10485760,
"pipe": true
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 68157440,
"cpuLimit": 3000000000,
"clockLimit": 6000000000,
"memoryLimit": 10485760,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
@ -84,26 +84,22 @@
{
"stdin": {
"src": "/home/tt/.config/joj/diff/case9.in"
},
"memoryLimit": 268435456
}
},
{
"stdin": {
"src": "/home/tt/.config/joj/diff/task1/subtask1/case11.in"
},
"memoryLimit": 268435456
}
},
{
"stdin": {
"src": "/home/tt/.config/joj/diff/task1/subtask1/case10.in"
},
"memoryLimit": 268435456
}
},
{
"stdin": {
"src": "/home/tt/.config/joj/diff/task1/case5.in"
},
"memoryLimit": 268435456
}
},
{
"stdin": {

View File

@ -8,7 +8,10 @@ release.begin_time = 2024-12-29 23:59:59+08:00
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"
files.import = [ "h7/build/ex2-asan" ]
limit.mem = "65m"
limit.cpu = "3s"
limit.mem = "10m"
limit.stdout = "10m"
limit.stderr = "10m"
parsers = [ "diff", "result-detail" ]
result-detail.exitstatus = true
@ -16,7 +19,6 @@ result-detail.stderr = true
diff.default_score = 100
# will be removed as long as the name is fixed
case0.diff.output.score = 5
case0.limit.cpu = "1s"
case0.limit.mem = "2m"