fix: remove redundant cotent in small testcases
Some checks failed
build / build (push) Failing after 2m30s
build / build (pull_request) Failing after 2m29s

This commit is contained in:
李衍志523370910113 2025-02-25 08:35:49 +08:00
parent 80e2bf6bad
commit 454b320740
17 changed files with 78 additions and 2701 deletions

View File

@ -69,5 +69,6 @@ def convert(
if distribute:
folder_path = "/home/tt/.config/joj"
folder_path = f"{Path.home()}/Desktop/engr151-joj/home/tt/.config/joj/homework"
folder_path = f"{Path.home()}/Desktop/FOCS/JOJ3-config-generator/tests/convert/"
distribute_json(folder_path, repo_obj, conf_root=root)
return result_dict

View File

@ -125,7 +125,8 @@ def get_hash(immutable_files: list[str]) -> str: # input should be a list
# FIXME: should be finalized when get into the server
current_file_path = Path(__file__).resolve()
project_root = current_file_path.parents[2]
file_path = f"{project_root}/tests/immutable_p3-test/"
# FIXME: givin the path
file_path = f"{project_root}/tests/immutable_file/"
# default value as hardcoded
# file_path = "{Path.home()}/.cache/immutable"
immutable_hash = []

View File

@ -0,0 +1,15 @@
sandbox_token = "test"
# reconfigure later
max_total_score = 100
max_size = 50.5
# for tests
[groups]
name = ["joj", "run"]
max_count = [1000, 1000]
time_period_hour = [24, 24]
[files]
required = ["README.md", "Changelog.md"]
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml"]

View File

@ -204,113 +204,6 @@
}
]
},
{
"name": "[cq] Filelength",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./tools/filelength",
"400",
"300",
"*.cpp",
"*.h"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tools/filelength": {
"src": "/home/tt/./tools/tools/filelength",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "keyword",
"with": {
"matches": [
{
"keywords": [
"recommended"
],
"score": 10
},
{
"keywords": [
"max"
],
"score": 20
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Clang-tidy",
"group": "cq",
@ -445,359 +338,6 @@
}
}
]
},
{
"name": "[cq] Cppcheck",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cppcheck",
"--template={\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}",
"--force",
"--enable=all",
"--suppress=missingIncludeSystem",
"--quiet",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 65000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cppcheck",
"with": {
"matches": [
{
"keywords": [
"warning",
"portability",
"performance",
"style"
],
"score": 5
},
{
"keywords": [
"error"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cpplint",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cpplint",
"--linelength=120",
"--filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use",
"--recursive",
"--exclude=build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cpplint",
"with": {
"matches": [
{
"keywords": [
"build"
],
"score": 10
},
{
"keywords": [
"readability"
],
"score": 20
},
{
"keywords": [
"runtime"
],
"score": 5
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[joj] ex2-asan",
"group": "joj",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./h7/build/ex2-asan",
"-a"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 95656304705536,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": [
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case0.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
},
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case1.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
}
]
}
},
"parsers": [
{
"name": "diff",
"with": {
"name": "diff",
"cases": [
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case0.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
},
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case1.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
}
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": true,
"showMemory": true
}
}
]
}
],
"poststages": [

View File

@ -21,19 +21,6 @@ result-detail.time = false
result-detail.mem = false
result-status.forcequit = true
[[stages]]
name = "[cq] Filelength"
command = "./tools/filelength 400 300 *.cpp *.h"
files.import = [ "tools/filelength" ]
parsers = [ "keyword", "result-detail" ]
keyword.keyword = [ "max", "recommended"]
keyword.weight = [ 20, 10 ]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Clang-tidy"
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p h7/build h7/ex2.cpp"
@ -47,56 +34,3 @@ result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cppcheck"
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --suppress=missingIncludeSystem --quiet h7/ex2.cpp"
limit.stderr = 65
parsers = [ "cppcheck", "result-detail" ]
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
cppcheck.weight = [15, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
limit.stdout = 65
parsers = [ "cpplint", "result-detail" ]
cpplint.keyword = [ "runtime", "readability", "build" ]
cpplint.weight = [ 5, 20, 10]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"
files.import = [ "h7/build/ex2-asan" ]
limit.mem = 91224961
parsers = [ "diff", "result-detail" ]
result-detail.exitstatus = true
result-detail.stderr = true
# will be removed as long as the name is fixed
case0.diff.output.score = 5
case0.limit.cpu = 1
case0.limit.mem = 91224961
case0.diff.output.ignorespaces = true
#case0.limit.stdout = 8
#case0.command = "./h7/build/ex2"
case0.in = "case0.in"
case1.diff.output.score = 5
case1.limit.cpu = 1
case1.limit.mem = 91224961
case1.diff.output.ignorespaces = true
#case1.limit.stdout = 8
#case1.command = "./h7/build/ex2"
case1.in = "case1.in"

View File

@ -0,0 +1,15 @@
sandbox_token = "test"
# reconfigure later
max_total_score = 100
max_size = 50.5
# for tests
[groups]
name = ["joj", "run"]
max_count = [1000, 1000]
time_period_hour = [24, 24]
[files]
required = ["README.md", "Changelog.md"]
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml"]

View File

@ -204,248 +204,6 @@
}
]
},
{
"name": "[cq] Filelength",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./tools/filelength",
"400",
"300",
"*.cpp",
"*.h"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tools/filelength": {
"src": "/home/tt/./tools/tools/filelength",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "keyword",
"with": {
"matches": [
{
"keywords": [
"recommended"
],
"score": 10
},
{
"keywords": [
"max"
],
"score": 20
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Clang-tidy",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"run-clang-tidy-18",
"-header-filter=.*",
"-quiet",
"-load=/usr/local/lib/libcodequality.so",
"-p",
"h7/build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tests/homework/h7/.clang-tidy": {
"src": "/home/tt/./tools/tests/homework/h7/.clang-tidy",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "clangtidy",
"with": {
"matches": [
{
"keywords": [
"readability-function-size"
],
"score": 10
},
{
"keywords": [
"codequality-no-global-variables",
"codequality-no-header-guard",
"codequality-no-fflush-stdin"
],
"score": 20
},
{
"keywords": [
"codequality-unchecked-malloc-result",
"readability-duplicate-include",
"readability-identifier-naming",
"readability-redundant",
"readability-misplaced-array-index",
"cppcoreguidelines-init-variables",
"bugprone-suspicious-string-compare",
"google-global-names-in-headers",
"clang-diagnostic",
"clang-analyzer",
"misc",
"performance",
"portability"
],
"score": 5
},
{
"keywords": [
"readability-misleading-indentation"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cppcheck",
"group": "cq",
@ -552,252 +310,6 @@
}
}
]
},
{
"name": "[cq] Cpplint",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cpplint",
"--linelength=120",
"--filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use",
"--recursive",
"--exclude=build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cpplint",
"with": {
"matches": [
{
"keywords": [
"build"
],
"score": 10
},
{
"keywords": [
"readability"
],
"score": 20
},
{
"keywords": [
"runtime"
],
"score": 5
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[joj] ex2-asan",
"group": "joj",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./h7/build/ex2-asan",
"-a"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 95656304705536,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": [
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case0.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
},
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case1.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
}
]
}
},
"parsers": [
{
"name": "diff",
"with": {
"name": "diff",
"cases": [
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case0.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
},
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case1.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
}
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": true,
"showMemory": true
}
}
]
}
],
"poststages": [

View File

@ -21,33 +21,6 @@ result-detail.time = false
result-detail.mem = false
result-status.forcequit = true
[[stages]]
name = "[cq] Filelength"
command = "./tools/filelength 400 300 *.cpp *.h"
files.import = [ "tools/filelength" ]
parsers = [ "keyword", "result-detail" ]
keyword.keyword = [ "max", "recommended"]
keyword.weight = [ 20, 10 ]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Clang-tidy"
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p h7/build h7/ex2.cpp"
files.import = [ "tests/homework/h7/.clang-tidy", "h7/build/compile_commands.json" ]
limit.stdout = 65
parsers = [ "clangtidy", "result-detail" ]
clangtidy.keyword = [ "codequality-unchecked-malloc-result", "codequality-no-global-variables", "codequality-no-header-guard", "codequality-no-fflush-stdin", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc", "performance", "portability" ]
clangtidy.weight = [ 5, 20, 20, 20, 10, 5, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cppcheck"
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --suppress=missingIncludeSystem --quiet h7/ex2.cpp"
@ -60,43 +33,3 @@ result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
limit.stdout = 65
parsers = [ "cpplint", "result-detail" ]
cpplint.keyword = [ "runtime", "readability", "build" ]
cpplint.weight = [ 5, 20, 10]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"
files.import = [ "h7/build/ex2-asan" ]
limit.mem = 91224961
parsers = [ "diff", "result-detail" ]
result-detail.exitstatus = true
result-detail.stderr = true
# will be removed as long as the name is fixed
case0.diff.output.score = 5
case0.limit.cpu = 1
case0.limit.mem = 91224961
case0.diff.output.ignorespaces = true
#case0.limit.stdout = 8
#case0.command = "./h7/build/ex2"
case0.in = "case0.in"
case1.diff.output.score = 5
case1.limit.cpu = 1
case1.limit.mem = 91224961
case1.diff.output.ignorespaces = true
#case1.limit.stdout = 8
#case1.command = "./h7/build/ex2"
case1.in = "case1.in"

View File

@ -0,0 +1,15 @@
sandbox_token = "test"
# reconfigure later
max_total_score = 100
max_size = 50.5
# for tests
[groups]
name = ["joj", "run"]
max_count = [1000, 1000]
time_period_hour = [24, 24]
[files]
required = ["README.md", "Changelog.md"]
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml"]

View File

@ -204,355 +204,6 @@
}
]
},
{
"name": "[cq] Filelength",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./tools/filelength",
"400",
"300",
"*.cpp",
"*.h"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tools/filelength": {
"src": "/home/tt/./tools/tools/filelength",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "keyword",
"with": {
"matches": [
{
"keywords": [
"recommended"
],
"score": 10
},
{
"keywords": [
"max"
],
"score": 20
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Clang-tidy",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"run-clang-tidy-18",
"-header-filter=.*",
"-quiet",
"-load=/usr/local/lib/libcodequality.so",
"-p",
"h7/build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tests/homework/h7/.clang-tidy": {
"src": "/home/tt/./tools/tests/homework/h7/.clang-tidy",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "clangtidy",
"with": {
"matches": [
{
"keywords": [
"readability-function-size"
],
"score": 10
},
{
"keywords": [
"codequality-no-global-variables",
"codequality-no-header-guard",
"codequality-no-fflush-stdin"
],
"score": 20
},
{
"keywords": [
"codequality-unchecked-malloc-result",
"readability-duplicate-include",
"readability-identifier-naming",
"readability-redundant",
"readability-misplaced-array-index",
"cppcoreguidelines-init-variables",
"bugprone-suspicious-string-compare",
"google-global-names-in-headers",
"clang-diagnostic",
"clang-analyzer",
"misc",
"performance",
"portability"
],
"score": 5
},
{
"keywords": [
"readability-misleading-indentation"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cppcheck",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cppcheck",
"--template={\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}",
"--force",
"--enable=all",
"--suppress=missingIncludeSystem",
"--quiet",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 65000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cppcheck",
"with": {
"matches": [
{
"keywords": [
"warning",
"portability",
"performance",
"style"
],
"score": 5
},
{
"keywords": [
"error"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cpplint",
"group": "cq",
@ -661,143 +312,6 @@
}
}
]
},
{
"name": "[joj] ex2-asan",
"group": "joj",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./h7/build/ex2-asan",
"-a"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 95656304705536,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": [
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case0.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
},
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case1.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
}
]
}
},
"parsers": [
{
"name": "diff",
"with": {
"name": "diff",
"cases": [
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case0.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
},
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case1.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
}
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": true,
"showMemory": true
}
}
]
}
],
"poststages": [

View File

@ -21,46 +21,6 @@ result-detail.time = false
result-detail.mem = false
result-status.forcequit = true
[[stages]]
name = "[cq] Filelength"
command = "./tools/filelength 400 300 *.cpp *.h"
files.import = [ "tools/filelength" ]
parsers = [ "keyword", "result-detail" ]
keyword.keyword = [ "max", "recommended"]
keyword.weight = [ 20, 10 ]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Clang-tidy"
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p h7/build h7/ex2.cpp"
files.import = [ "tests/homework/h7/.clang-tidy", "h7/build/compile_commands.json" ]
limit.stdout = 65
parsers = [ "clangtidy", "result-detail" ]
clangtidy.keyword = [ "codequality-unchecked-malloc-result", "codequality-no-global-variables", "codequality-no-header-guard", "codequality-no-fflush-stdin", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc", "performance", "portability" ]
clangtidy.weight = [ 5, 20, 20, 20, 10, 5, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cppcheck"
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --suppress=missingIncludeSystem --quiet h7/ex2.cpp"
limit.stderr = 65
parsers = [ "cppcheck", "result-detail" ]
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
cppcheck.weight = [15, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
@ -73,30 +33,3 @@ result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"
files.import = [ "h7/build/ex2-asan" ]
limit.mem = 91224961
parsers = [ "diff", "result-detail" ]
result-detail.exitstatus = true
result-detail.stderr = true
# will be removed as long as the name is fixed
case0.diff.output.score = 5
case0.limit.cpu = 1
case0.limit.mem = 91224961
case0.diff.output.ignorespaces = true
#case0.limit.stdout = 8
#case0.command = "./h7/build/ex2"
case0.in = "case0.in"
case1.diff.output.score = 5
case1.limit.cpu = 1
case1.limit.mem = 91224961
case1.diff.output.ignorespaces = true
#case1.limit.stdout = 8
#case1.command = "./h7/build/ex2"
case1.in = "case1.in"

View File

@ -0,0 +1,15 @@
sandbox_token = "test"
# reconfigure later
max_total_score = 100
max_size = 50.5
# for tests
[groups]
name = ["joj", "run"]
max_count = [1000, 1000]
time_period_hour = [24, 24]
[files]
required = ["README.md", "Changelog.md"]
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml"]

View File

@ -204,464 +204,6 @@
}
]
},
{
"name": "[cq] Filelength",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./tools/filelength",
"400",
"300",
"*.cpp",
"*.h"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tools/filelength": {
"src": "/home/tt/./tools/tools/filelength",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "keyword",
"with": {
"matches": [
{
"keywords": [
"recommended"
],
"score": 10
},
{
"keywords": [
"max"
],
"score": 20
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Clang-tidy",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"run-clang-tidy-18",
"-header-filter=.*",
"-quiet",
"-load=/usr/local/lib/libcodequality.so",
"-p",
"h7/build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tests/homework/h7/.clang-tidy": {
"src": "/home/tt/./tools/tests/homework/h7/.clang-tidy",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "clangtidy",
"with": {
"matches": [
{
"keywords": [
"readability-function-size"
],
"score": 10
},
{
"keywords": [
"codequality-no-global-variables",
"codequality-no-header-guard",
"codequality-no-fflush-stdin"
],
"score": 20
},
{
"keywords": [
"codequality-unchecked-malloc-result",
"readability-duplicate-include",
"readability-identifier-naming",
"readability-redundant",
"readability-misplaced-array-index",
"cppcoreguidelines-init-variables",
"bugprone-suspicious-string-compare",
"google-global-names-in-headers",
"clang-diagnostic",
"clang-analyzer",
"misc",
"performance",
"portability"
],
"score": 5
},
{
"keywords": [
"readability-misleading-indentation"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cppcheck",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cppcheck",
"--template={\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}",
"--force",
"--enable=all",
"--suppress=missingIncludeSystem",
"--quiet",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 65000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cppcheck",
"with": {
"matches": [
{
"keywords": [
"warning",
"portability",
"performance",
"style"
],
"score": 5
},
{
"keywords": [
"error"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cpplint",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cpplint",
"--linelength=120",
"--filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use",
"--recursive",
"--exclude=build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cpplint",
"with": {
"matches": [
{
"keywords": [
"build"
],
"score": 10
},
{
"keywords": [
"readability"
],
"score": 20
},
{
"keywords": [
"runtime"
],
"score": 5
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[joj] ex2-asan",
"group": "joj",

View File

@ -21,59 +21,6 @@ result-detail.time = false
result-detail.mem = false
result-status.forcequit = true
[[stages]]
name = "[cq] Filelength"
command = "./tools/filelength 400 300 *.cpp *.h"
files.import = [ "tools/filelength" ]
parsers = [ "keyword", "result-detail" ]
keyword.keyword = [ "max", "recommended"]
keyword.weight = [ 20, 10 ]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Clang-tidy"
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p h7/build h7/ex2.cpp"
files.import = [ "tests/homework/h7/.clang-tidy", "h7/build/compile_commands.json" ]
limit.stdout = 65
parsers = [ "clangtidy", "result-detail" ]
clangtidy.keyword = [ "codequality-unchecked-malloc-result", "codequality-no-global-variables", "codequality-no-header-guard", "codequality-no-fflush-stdin", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc", "performance", "portability" ]
clangtidy.weight = [ 5, 20, 20, 20, 10, 5, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cppcheck"
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --suppress=missingIncludeSystem --quiet h7/ex2.cpp"
limit.stderr = 65
parsers = [ "cppcheck", "result-detail" ]
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
cppcheck.weight = [15, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
limit.stdout = 65
parsers = [ "cpplint", "result-detail" ]
cpplint.keyword = [ "runtime", "readability", "build" ]
cpplint.weight = [ 5, 20, 10]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"

View File

@ -0,0 +1,15 @@
sandbox_token = "test"
# reconfigure later
max_total_score = 100
max_size = 50.5
# for tests
[groups]
name = ["joj", "run"]
max_count = [1000, 1000]
time_period_hour = [24, 24]
[files]
required = ["README.md", "Changelog.md"]
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml"]

View File

@ -310,494 +310,6 @@
}
}
]
},
{
"name": "[cq] Clang-tidy",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"run-clang-tidy-18",
"-header-filter=.*",
"-quiet",
"-load=/usr/local/lib/libcodequality.so",
"-p",
"h7/build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {
"tests/homework/h7/.clang-tidy": {
"src": "/home/tt/./tools/tests/homework/h7/.clang-tidy",
"max": 419430400
}
},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "clangtidy",
"with": {
"matches": [
{
"keywords": [
"readability-function-size"
],
"score": 10
},
{
"keywords": [
"codequality-no-global-variables",
"codequality-no-header-guard",
"codequality-no-fflush-stdin"
],
"score": 20
},
{
"keywords": [
"codequality-unchecked-malloc-result",
"readability-duplicate-include",
"readability-identifier-naming",
"readability-redundant",
"readability-misplaced-array-index",
"cppcoreguidelines-init-variables",
"bugprone-suspicious-string-compare",
"google-global-names-in-headers",
"clang-diagnostic",
"clang-analyzer",
"misc",
"performance",
"portability"
],
"score": 5
},
{
"keywords": [
"readability-misleading-indentation"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stdout"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cppcheck",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cppcheck",
"--template={\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}",
"--force",
"--enable=all",
"--suppress=missingIncludeSystem",
"--quiet",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 65000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cppcheck",
"with": {
"matches": [
{
"keywords": [
"warning",
"portability",
"performance",
"style"
],
"score": 5
},
{
"keywords": [
"error"
],
"score": 15
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[cq] Cpplint",
"group": "cq",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"cpplint",
"--linelength=120",
"--filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use",
"--recursive",
"--exclude=build",
"h7/ex2.cpp"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"content": "",
"max": 419430400
},
"stdout": {
"name": "stdout",
"max": 65000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 838860800,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": []
}
},
"parsers": [
{
"name": "cpplint",
"with": {
"matches": [
{
"keywords": [
"build"
],
"score": 10
},
{
"keywords": [
"readability"
],
"score": 20
},
{
"keywords": [
"runtime"
],
"score": 5
}
],
"fullscore": 0,
"minscore": -1000,
"files": [
"stdout",
"stderr"
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": false,
"showMemory": false
}
}
]
},
{
"name": "[joj] ex2-asan",
"group": "joj",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"./h7/build/ex2-asan",
"-a"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdout": {
"name": "stdout",
"max": 800000000000000
},
"stderr": {
"name": "stderr",
"max": 800000000000000
},
"cpuLimit": 1000000000000000,
"realCpuLimit": 0,
"clockLimit": 2000000000000000,
"memoryLimit": 95656304705536,
"stackLimit": 0,
"procLimit": 50,
"cpuRateLimit": 0,
"cpuSetLimit": "",
"copyIn": {},
"copyInCached": {
"h7/build/ex2": "h7/build/ex2",
"h7/build/ex2-asan": "h7/build/ex2-asan",
"h7/build/ex2-ubsan": "h7/build/ex2-ubsan",
"h7/build/ex2-msan": "h7/build/ex2-msan",
"h7/build/compile_commands.json": "h7/build/compile_commands.json"
},
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"copyOutCached": [],
"copyOutMax": 0,
"copyOutDir": "",
"tty": false,
"strictMemoryLimit": false,
"dataSegmentLimit": false,
"addressSpaceLimit": false
},
"cases": [
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case0.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
},
{
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": {
"src": "/home/tt/./homework/h7/e2/case1.in",
"max": 419430400
},
"cpuLimit": 1000000000,
"clockLimit": 2000000000,
"memoryLimit": 95656304705536,
"procLimit": 50,
"copyOut": [
"stdout",
"stderr"
]
}
]
}
},
"parsers": [
{
"name": "diff",
"with": {
"name": "diff",
"cases": [
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case0.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
},
{
"outputs": [
{
"score": 5,
"fileName": "stdout",
"answerPath": "/home/tt/./homework/h7/e2/case1.out",
"forceQuitOnDiff": false,
"alwaysHide": false,
"compareSpace": false
}
]
}
]
}
},
{
"name": "result-detail",
"with": {
"score": 0,
"comment": "",
"showFiles": [
"stderr"
],
"showExitStatus": true,
"showRuntime": true,
"showMemory": true
}
}
]
}
],
"poststages": [

View File

@ -33,70 +33,3 @@ result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Clang-tidy"
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p h7/build h7/ex2.cpp"
files.import = [ "tests/homework/h7/.clang-tidy", "h7/build/compile_commands.json" ]
limit.stdout = 65
parsers = [ "clangtidy", "result-detail" ]
clangtidy.keyword = [ "codequality-unchecked-malloc-result", "codequality-no-global-variables", "codequality-no-header-guard", "codequality-no-fflush-stdin", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc", "performance", "portability" ]
clangtidy.weight = [ 5, 20, 20, 20, 10, 5, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stdout = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cppcheck"
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --suppress=missingIncludeSystem --quiet h7/ex2.cpp"
limit.stderr = 65
parsers = [ "cppcheck", "result-detail" ]
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
cppcheck.weight = [15, 5, 5, 5, 5]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
limit.stdout = 65
parsers = [ "cpplint", "result-detail" ]
cpplint.keyword = [ "runtime", "readability", "build" ]
cpplint.weight = [ 5, 20, 10]
result-detail.exitstatus = true
result-detail.stderr = true
result-detail.time = false
result-detail.mem = false
[[stages]]
name = "[joj] ex2-asan"
command="./h7/build/ex2-asan -a"
files.import = [ "h7/build/ex2-asan" ]
limit.mem = 91224961
parsers = [ "diff", "result-detail" ]
result-detail.exitstatus = true
result-detail.stderr = true
# will be removed as long as the name is fixed
case0.diff.output.score = 5
case0.limit.cpu = 1
case0.limit.mem = 91224961
case0.diff.output.ignorespaces = true
#case0.limit.stdout = 8
#case0.command = "./h7/build/ex2"
case0.in = "case0.in"
case1.diff.output.score = 5
case1.limit.cpu = 1
case1.limit.mem = 91224961
case1.diff.output.ignorespaces = true
#case1.limit.stdout = 8
#case1.command = "./h7/build/ex2"
case1.in = "case1.in"