diff --git a/joj3_config_generator/convert.py b/joj3_config_generator/convert.py index d59d076..848ad53 100644 --- a/joj3_config_generator/convert.py +++ b/joj3_config_generator/convert.py @@ -1,4 +1,5 @@ from joj3_config_generator.lib.repo import getHealthcheckConfig, getTeapotConfig +from joj3_config_generator.lib.task import fix_keyword from joj3_config_generator.models import ( Cmd, CmdFile, @@ -17,7 +18,8 @@ from joj3_config_generator.models import ( # FIXME: LLM generated convert function, only for demostration def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config: # Create the base ResultConf object - result_conf = result.Config( + # FIXME: wrap things in functions + result_conf = ResultConfig( name=task_conf.task, # TODO: specify the exact folder difference log_path=f"{task_conf.task.replace(' ', '-')}.log", @@ -80,6 +82,7 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config: ParserConfig(name=parser, with_={}) for parser in task_stage.parsers ], ) + # TODO: fix all parser here if "result-detail" in task_stage.parsers: result_detail_parser = next( p for p in conf_stage.parsers if p.name == "result-detail" @@ -87,6 +90,20 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config: if task_stage.result_detail is not None: result_detail_parser.with_.update(task_stage.result_detail) + if "dummy" in task_stage.parsers: + dummy_parser = next(p for p in conf_stage.parsers if p.name == "dummy") + if task_stage.dummy is not None: + dummy_parser.with_.update(task_stage.dummy) + + if "result-status" in task_stage.parsers: + result_status_parser = next( + p for p in conf_stage.parsers if p.name == "result-status" + ) + if task_stage.result_status is not None: + result_status_parser.with_.update(task_stage.result_status) + + conf_stage = fix_keyword(task_stage, conf_stage) + result_conf.stage.stages.append(conf_stage) return result_conf diff --git a/joj3_config_generator/lib/task.py b/joj3_config_generator/lib/task.py index 7a29cf7..c8bffeb 100644 --- a/joj3_config_generator/lib/task.py +++ b/joj3_config_generator/lib/task.py @@ -1,254 +1,20 @@ -from typing import Tuple - -import rtoml - -from joj3_config_generator.models import joj1, repo, result, task +from joj3_config_generator.models.result import Stage as ResultStage +from joj3_config_generator.models.task import Stage as TaskStage -def get_conf_stage( - task_stage: task.Stage, executor_with_config: result.ExecutorWith -) -> result.StageDetail: - conf_stage = result.StageDetail( - name=task_stage.name if task_stage.name is not None else "", - # TODO: we may have cq in future - group=( - "joj" - if (task_stage.name is not None) and ("judge" in task_stage.name) - else None - ), - executor=result.Executor( - name="sandbox", - with_=executor_with_config, - ), - parsers=( - [result.Parser(name=parser, with_={}) for parser in task_stage.parsers] - if task_stage.parsers is not None - else [] - ), - ) - return conf_stage - - -def get_executorWithConfig( - task_stage: task.Stage, cached: list[str] -) -> Tuple[result.ExecutorWith, list[str]]: - file_import = ( - task_stage.files.import_ - if hasattr(task_stage, "files") - and hasattr(task_stage.files, "import_") - and (task_stage.files is not None) - and (task_stage.files.import_ is not None) - else [] - ) - copy_in_files = [file for file in file_import if (file not in cached)] - file_export = ( - task_stage.files.export - if hasattr(task_stage, "files") - and hasattr(task_stage.files, "export") - and (task_stage.files is not None) - else [] - ) - executor_with_config = result.ExecutorWith( - default=result.Cmd( - args=(task_stage.command.split() if task_stage.command is not None else []), - copy_in={ - file: result.CmdFile(src=f"/home/tt/.config/joj/{file}") - for file in copy_in_files - }, - copy_in_cached={file: file for file in copy_in_files}, - copy_out_cached=file_export if file_export is not None else [], - cpu_limit=( - task_stage.limit.cpu * 1_000_000_000 - if task_stage.limit is not None and task_stage.limit.cpu is not None - else 4 * 1_000_000_000 - ), - clock_limit=( - 2 * task_stage.limit.cpu * 1_000_000_000 - if task_stage.limit is not None and task_stage.limit.cpu is not None - else 8 * 1_000_000_000 - ), - memory_limit=( - task_stage.limit.mem * 1_024 * 1_024 - if task_stage.limit is not None and task_stage.limit.mem is not None - else 4 * 1_024 * 1_024 - ), - stderr=result.CmdFile( - name="stderr", - max=( - task_stage.limit.stderr * 1_000_000_000 - if task_stage.limit is not None - and task_stage.limit.stderr is not None - else 4 * 1_024 * 1_024 - ), - ), - stdout=result.CmdFile( - name="stdout", - max=( - task_stage.limit.stdout * 1_000_000_000 - if task_stage.limit is not None - and task_stage.limit.stdout is not None - else 4 * 1_024 * 1_024 - ), - ), - ), - cases=[], # You can add cases if needed - ) - if file_export is not None: - for file in file_export: - if file not in cached: - cached.append(file) - return (executor_with_config, cached) - - -def fix_keyword( - task_stage: task.Stage, conf_stage: result.StageDetail -) -> result.StageDetail: +def fix_keyword(task_stage: TaskStage, conf_stage: ResultStage) -> ResultStage: keyword_parser = ["clangtidy", "keyword", "cppcheck"] # TODO: may add cpplint - if task_stage.parsers is not None: - for parser in task_stage.parsers: - if parser in keyword_parser: - keyword_parser_ = next( - p for p in conf_stage.parsers if p.name == parser - ) - keyword_weight = [] - if getattr(task_stage, parser, None) is not None: - for _, keyword in enumerate(getattr(task_stage, parser).keyword): - keyword_weight.append({"keyword": [keyword], "score": 0}) - for idx, weight in enumerate(getattr(task_stage, parser).weight): - keyword_weight[idx]["score"] = weight - - keyword_parser_.with_.update({"match": keyword_weight}) - else: - continue - return conf_stage - - -def fix_result_detail( - task_stage: task.Stage, conf_stage: result.StageDetail -) -> result.StageDetail: - if (task_stage.parsers is not None) and ("result-detail" in task_stage.parsers): - result_detail_parser = next( - p for p in conf_stage.parsers if p.name == "result-detail" - ) - if task_stage.result_detail is not None: - show_files = [] - if ( - task_stage.result_detail.stdout - and task_stage.result_detail.stdout is not None - ): - show_files.append("stdout") - if ( - task_stage.result_detail.stderr - and task_stage.result_detail.stderr is not None - ): - show_files.append("stderr") - result_detail_parser.with_.update( - { - "score": 0, - "comment": "", - "showFiles": show_files, - "showExitStatus": task_stage.result_detail.exitstatus, - "showRuntime": task_stage.result_detail.time, - "showMemory": task_stage.result_detail.mem, - } - ) - - return conf_stage - - -def fix_comment( - task_stage: task.Stage, conf_stage: result.StageDetail -) -> result.StageDetail: - comment_parser = [ - "dummy", - "result-status", - "cpplint", - ] # FIXME: determine where cpplint should be - if task_stage.parsers is not None: - for parser in task_stage.parsers: - if parser in comment_parser: - comment_parser_ = next( - p for p in conf_stage.parsers if p.name == parser - ) - if getattr(task_stage, parser.replace("-", "_"), None) is not None: - comment_parser_.with_.update( - getattr(task_stage, parser.replace("-", "_")) - ) - else: - continue - return conf_stage - - -def fix_diff( - task_stage: task.Stage, conf_stage: result.StageDetail -) -> result.StageDetail: - if task_stage.parsers is not None and "diff" in task_stage.parsers: - diff_parser = next((p for p in conf_stage.parsers if p.name == "diff"), None) - skip = task_stage.skip or [] - cases = task_stage.cases or {} - finalized_cases = [case for case in cases if case not in skip] - - stage_cases = [] - parser_cases = [] - - for case in finalized_cases: - case_stage = task_stage.cases.get(case) if task_stage.cases else None - if not case_stage: - continue - - # Ensure case_stage.limit is defined before accessing .cpu and .mem - cpu_limit = ( - case_stage.limit.cpu * 1_000_000_000 - if case_stage.limit and case_stage.limit.cpu is not None - else 0 - ) - clock_limit = ( - 2 * case_stage.limit.cpu * 1_000_000_000 - if case_stage.limit and case_stage.limit.cpu is not None - else 0 - ) - memory_limit = ( - case_stage.limit.mem * 1_024 * 1_024 - if case_stage.limit and case_stage.limit.mem is not None - else 0 - ) - - stage_cases.append( - result.OptionalCmd( - stdin=result.CmdFile( - src=f"/home/tt/.config/joj/{conf_stage.name}/{case}.in" - ), - cpu_limit=cpu_limit, - clock_limit=clock_limit, - memory_limit=memory_limit, - proc_limit=50, - ) - ) - - # Ensure case_stage.diff and case_stage.diff.output are defined - diff_output = ( - case_stage.diff.output - if case_stage.diff and case_stage.diff.output - else None - ) - if diff_output: - parser_cases.append( - { - "outputs": [ - { - "score": diff_output.score, - "fileName": "stdout", - "answerPath": f"/home/tt/.config/joj/{conf_stage.name}/{case}.out", - "forceQuitOnDiff": diff_output.forcequit, - "alwaysHide": diff_output.hide, - "compareSpace": not diff_output.ignorespaces, - } - ] - } - ) - - if diff_parser and task_stage.diff is not None: - diff_parser.with_.update({"name": "diff", "cases": parser_cases}) - conf_stage.executor.with_.cases = stage_cases + for parser in task_stage.parsers: + if parser in keyword_parser: + keyword_parser_ = next(p for p in conf_stage.parsers if p.name == parser) + keyword_weight = [] + if getattr(task_stage, parser, None) is not None: + for _, keyword in enumerate(getattr(task_stage, parser).keyword): + keyword_weight.append({"keyword": [keyword], "score": 0}) + for idx, weight in enumerate(getattr(task_stage, parser).weight): + keyword_weight[idx]["score"] = weight + keyword_parser_.with_.update({"match": keyword_weight}) + else: + continue return conf_stage diff --git a/joj3_config_generator/main.py b/joj3_config_generator/main.py index 823804c..9e07455 100644 --- a/joj3_config_generator/main.py +++ b/joj3_config_generator/main.py @@ -62,7 +62,6 @@ def convert(root: Path = Path(".")) -> result.Config: task_toml = task_file.read() repo_obj = rtoml.loads(repo_toml) task_obj = rtoml.loads(task_toml) - print(task_obj) result_model = convert_conf(Repo(**repo_obj), Task(**task_obj)) result_dict = result_model.model_dump(by_alias=True) diff --git a/joj3_config_generator/models/task.py b/joj3_config_generator/models/task.py index 77fd23d..2bb15cd 100644 --- a/joj3_config_generator/models/task.py +++ b/joj3_config_generator/models/task.py @@ -18,8 +18,8 @@ class ParserDummy(BaseModel): class ParserKeyword(BaseModel): - keyword: Optional[list[str]] = None - weight: Optional[list[int]] = None + keyword: Optional[list[str]] = [] + weight: Optional[list[int]] = [] class Files(BaseModel): @@ -42,6 +42,7 @@ class Stage(BaseModel): parsers: list[str] # list of parsers limit: Optional[Limit] = None dummy: Optional[ParserDummy] = ParserDummy() + result_status: Optional[ParserDummy] = Field(ParserDummy(), alias="result-status") keyword: Optional[ParserKeyword] = ParserKeyword() clangtidy: Optional[ParserKeyword] = ParserKeyword() cppcheck: Optional[ParserKeyword] = ParserKeyword() diff --git a/tests/convert/basic/task.json b/tests/convert/basic/task.json index 9ac998d..e69de29 100644 --- a/tests/convert/basic/task.json +++ b/tests/convert/basic/task.json @@ -1,1327 +0,0 @@ -{ - "name": "h4 ex1", - "logPath": "h4-ex1.log", - "expireUnixTimestamp": 1728748740, - "stage": { - "sandboxExecServer": "172.17.0.1:5051", - "sandboxToken": "test", - "outputPath": "/tmp/joj3_result.json", - "stages": [ - { - "name": "healthcheck", - "group": "", - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "//repo-health-checker", - "-root=.", - "-repoSize=50.5", - "-meta=main.py", - "-meta=README.md", - "-checkFileSumList=-checkFileNameList=" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4096, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4096, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 4000000000, - "realCpuLimit": 0, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": { - "//tmp/repo-checker-5txkd_qm/repo-health-checker": { - "src": "//tmp/repo-checker-i9n16_cy/repo-health-checker", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - } - }, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "healthcheck", - "with": { - "score": 0, - "comment": "" - } - } - ] - }, - { - "name": "Compilation", - "group": null, - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "make.sh" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 128000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 180000000000, - "realCpuLimit": 0, - "clockLimit": 360000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": { - "tools/make.sh": { - "src": "/home/tt/.config/joj/tools/make.sh", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "src/main.c": { - "src": "/home/tt/.config/joj/src/main.c", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "src/task.h": { - "src": "/home/tt/.config/joj/src/task.h", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "srcCMakelist.txt": { - "src": "/home/tt/.config/joj/srcCMakelist.txt", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - } - }, - "copyInCached": { - "tools/make.sh": "tools/make.sh", - "src/main.c": "src/main.c", - "src/task.h": "src/task.h", - "srcCMakelist.txt": "srcCMakelist.txt" - }, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [ - "driver", - "p2", - "p2-msan" - ], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stderr" - ], - "showExitStatus": true, - "showRuntime": false, - "showMemory": false - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-status", - "with": { - "comment": "Congratulations! Your code compiled successfully." - } - } - ] - }, - { - "name": "File length check", - "group": null, - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "./file-length", - "500", - "400", - "*.c", - "*.h" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 4000000000, - "realCpuLimit": 0, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": { - "tools/file-length": { - "src": "/home/tt/.config/joj/tools/file-length", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - } - }, - "copyInCached": { - "tools/file-length": "tools/file-length" - }, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "keyword", - "with": { - "match": [ - { - "keyword": [ - "max" - ], - "score": 50 - }, - { - "keyword": [ - "recommend" - ], - "score": 20 - } - ] - } - }, - { - "name": "dummy", - "with": { - "comment": "" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stderr" - ], - "showExitStatus": false, - "showRuntime": false, - "showMemory": false - } - } - ] - }, - { - "name": "Clang-tidy checks", - "group": null, - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "run-clang-tidy-18", - "-header-filter=.*", - "-quiet", - "-load=/usr/local/lib/libcodequality.so", - "-p", - "build" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 65000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 4000000000, - "realCpuLimit": 0, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": {}, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "clangtidy", - "with": { - "match": [ - { - "keyword": [ - "codequality-no-global-variables" - ], - "score": 10 - }, - { - "keyword": [ - "codequality-no-header-guard" - ], - "score": 10 - }, - { - "keyword": [ - "readability-function-size" - ], - "score": 50 - }, - { - "keyword": [ - "readability-duplicate-include" - ], - "score": 10 - }, - { - "keyword": [ - "readability-identifier-naming" - ], - "score": 5 - }, - { - "keyword": [ - "readability-redundant" - ], - "score": 5 - }, - { - "keyword": [ - "readability-misleading-indentation" - ], - "score": 10 - }, - { - "keyword": [ - "readability-misplaced-array-index" - ], - "score": 5 - }, - { - "keyword": [ - "cppcoreguidelines-init-variables" - ], - "score": 5 - }, - { - "keyword": [ - "bugprone-suspicious-string-compare" - ], - "score": 8 - }, - { - "keyword": [ - "google-global-names-in-headers" - ], - "score": 5 - }, - { - "keyword": [ - "clang-diagnostic" - ], - "score": 5 - }, - { - "keyword": [ - "clang-analyzer" - ], - "score": 5 - }, - { - "keyword": [ - "misc performance" - ], - "score": 5 - } - ] - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stdout" - ], - "showExitStatus": true, - "showRuntime": false, - "showMemory": false - } - } - ] - }, - { - "name": "Cppcheck check", - "group": null, - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "cppcheck", - "--template='{\"file\":\"{file}\",\"line\":{line},", - "\"column\":{column},", - "\"severity\":\"{severity}\",", - "\"message\":\"{message}\",", - "\"id\":\"{id}\"}'", - "--force", - "--enable=all", - "--quiet", - "./" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 65000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 4000000000, - "realCpuLimit": 0, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": {}, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "cppcheck", - "with": { - "match": [ - { - "keyword": [ - "error" - ], - "score": 20 - }, - { - "keyword": [ - "warning" - ], - "score": 10 - }, - { - "keyword": [ - "portability" - ], - "score": 15 - }, - { - "keyword": [ - "performance" - ], - "score": 15 - }, - { - "keyword": [ - "style" - ], - "score": 10 - } - ] - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stderr" - ], - "showExitStatus": true, - "showRuntime": false, - "showMemory": false - } - } - ] - }, - { - "name": "Cpplint check", - "group": null, - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "cpplint", - "--linelength=120", - "--filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-readability/todo,-build/include_subdir,-build/header_guard", - "--recursive", - "--exclude=build", - "." - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 65000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 4000000000, - "realCpuLimit": 0, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": {}, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [] - } - }, - "parsers": [ - { - "name": "cpplint", - "with": { - "comment": "" - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stdout" - ], - "showExitStatus": true, - "showRuntime": false, - "showMemory": false - } - } - ] - }, - { - "name": "judge-base", - "group": "joj", - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "./driver", - "./mumsh" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 3000000000, - "realCpuLimit": 0, - "clockLimit": 6000000000, - "memoryLimit": 78643200, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": {}, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [ - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-base/case4.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 30000000000, - "realCpuLimit": null, - "clockLimit": 60000000000, - "memoryLimit": 10485760, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - }, - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-base/case5.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 4000000000, - "realCpuLimit": null, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - }, - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-base/case8.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 4000000000, - "realCpuLimit": null, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - } - ] - } - }, - "parsers": [ - { - "name": "diff", - "with": { - "name": "diff", - "cases": [ - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-base/case4.out", - "forceQuitOnDiff": true, - "alwaysHide": false, - "compareSpace": true - } - ] - }, - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-base/case5.out", - "forceQuitOnDiff": true, - "alwaysHide": false, - "compareSpace": true - } - ] - }, - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-base/case8.out", - "forceQuitOnDiff": true, - "alwaysHide": false, - "compareSpace": true - } - ] - } - ] - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stderr" - ], - "showExitStatus": true, - "showRuntime": true, - "showMemory": true - } - } - ] - }, - { - "name": "judge-msan", - "group": "joj", - "executor": { - "name": "sandbox", - "with": { - "default": { - "args": [ - "./driver", - "./mumsh-msan" - ], - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": null, - "content": "", - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": { - "src": null, - "content": null, - "fileId": null, - "name": "stdout", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stderr": { - "src": null, - "content": null, - "fileId": null, - "name": "stderr", - "max": 4000000000, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "cpuLimit": 10000000000, - "realCpuLimit": 0, - "clockLimit": 20000000000, - "memoryLimit": 524288000, - "stackLimit": 0, - "procLimit": 50, - "cpuRateLimit": 0, - "cpuSetLimit": "", - "copyIn": {}, - "copyInCached": {}, - "copyInDir": ".", - "copyOut": [], - "copyOutCached": [], - "copyOutMax": 0, - "copyOutDir": "", - "tty": false, - "strictMemoryLimit": false, - "dataSegmentLimit": false, - "addressSpaceLimit": false - }, - "cases": [ - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-msan/case4.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 30000000000, - "realCpuLimit": null, - "clockLimit": 60000000000, - "memoryLimit": 10485760, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - }, - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-msan/case5.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 4000000000, - "realCpuLimit": null, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - }, - { - "args": null, - "env": [ - "PATH=/usr/bin:/bin:/usr/local/bin" - ], - "stdin": { - "src": "/home/tt/.config/joj/judge-msan/case6.in", - "content": null, - "fileId": null, - "name": null, - "max": 4194304, - "symlink": null, - "streamIn": false, - "streamOut": false, - "pipe": false - }, - "stdout": null, - "stderr": null, - "cpuLimit": 4000000000, - "realCpuLimit": null, - "clockLimit": 8000000000, - "memoryLimit": 4194304, - "stackLimit": null, - "procLimit": 50, - "cpuRateLimit": null, - "cpuSetLimit": null, - "copyIn": null, - "copyInCached": null, - "copyInDir": null, - "copyOut": null, - "copyOutCached": null, - "copyOutMax": null, - "copyOutDir": null, - "tty": null, - "strictMemoryLimit": null, - "dataSegmentLimit": null, - "addressSpaceLimit": null - } - ] - } - }, - "parsers": [ - { - "name": "diff", - "with": { - "name": "diff", - "cases": [ - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-msan/case4.out", - "forceQuitOnDiff": true, - "alwaysHide": false, - "compareSpace": true - } - ] - }, - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-msan/case5.out", - "forceQuitOnDiff": true, - "alwaysHide": false, - "compareSpace": true - } - ] - }, - { - "outputs": [ - { - "score": 0, - "fileName": "stdout", - "answerPath": "/home/tt/.config/joj/judge-msan/case6.out", - "forceQuitOnDiff": true, - "alwaysHide": true, - "compareSpace": true - } - ] - } - ] - } - }, - { - "name": "dummy", - "with": { - "comment": "\n\n### Details\n" - } - }, - { - "name": "result-detail", - "with": { - "score": 0, - "comment": "", - "showFiles": [ - "stderr" - ], - "showExitStatus": true, - "showRuntime": true, - "showMemory": true - } - } - ] - } - ] - }, - "teapot": { - "logPath": "h4-ex1-joint-teapot-debug.log", - "scoreboardPath": "h4-ex1-scoreboard.csv", - "failedTablePath": "h4-ex1-failed-table.md", - "gradingRepoName": "Nuvole-joj", - "skipIssue": false, - "skipScoreboard": false, - "skipFailedTable": false - } -}