Compare commits

...

3 Commits

Author SHA1 Message Date
2c3944ea3f fix: merge conflict
All checks were successful
build / build (push) Successful in 1m24s
2025-05-21 22:37:50 +08:00
01759efb7b
fix: set default env PATH
Some checks failed
build / build (push) Failing after 3m24s
2025-05-20 08:07:29 -04:00
8a6c34f3e9 feat(diff): auto detect testcases (#13)
All checks were successful
build / build (push) Successful in 2m1s
- added support for subfolders
- complete the duplication for `*.toml` file, now ta only need to specify the param for the specific one. default values are hardcoded
- all testcases should be named as `casei.in/out`, with no interactions in their name in each of the subfolders, (for hidden cases and non-hidden cases, just change position and run again)

Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: #13
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
2025-05-15 17:47:08 +08:00
9 changed files with 40 additions and 15 deletions

View File

@ -44,7 +44,7 @@ InputFile = Union[LocalFile, MemoryFile, PreparedFile, Symlink]
class Cmd(BaseModel): class Cmd(BaseModel):
args: List[str] = [] args: List[str] = []
env: List[str] = [] env: List[str] = ["PATH=/usr/bin:/bin:/usr/local/bin"]
stdin: Union[InputFile, StreamIn] = MemoryFile(content="") stdin: Union[InputFile, StreamIn] = MemoryFile(content="")
stdout: Union[Collector, StreamOut] = Collector(name="stdout") stdout: Union[Collector, StreamOut] = Collector(name="stdout")
stderr: Union[Collector, StreamOut] = Collector(name="stderr") stderr: Union[Collector, StreamOut] = Collector(name="stderr")

View File

@ -222,7 +222,6 @@ def fix_diff(
] ]
) )
parser_cases.append(parser_case) parser_cases.append(parser_case)
for case in default_cases: for case in default_cases:
cmd = result.OptionalCmd( cmd = result.OptionalCmd(
stdin=result.LocalFile(src=str(base_dir / f"{case}.in")) stdin=result.LocalFile(src=str(base_dir / f"{case}.in"))

View File

@ -18,7 +18,9 @@
"with": { "with": {
"default": { "default": {
"args": [], "args": [],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -108,7 +110,9 @@
"args": [ "args": [
"./tools/compile" "./tools/compile"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -195,7 +199,9 @@
"*.cpp", "*.cpp",
"*.h" "*.h"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -295,7 +301,9 @@
"h7/build", "h7/build",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -421,7 +429,9 @@
"--quiet", "--quiet",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -566,7 +576,9 @@
"--exclude=build", "--exclude=build",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },
@ -663,7 +675,9 @@
"./h7/build/ex2-asan", "./h7/build/ex2-asan",
"-a" "-a"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -26,7 +26,9 @@
"h7/build", "h7/build",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -26,7 +26,9 @@
"--quiet", "--quiet",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -25,7 +25,9 @@
"--exclude=build", "--exclude=build",
"h7/ex2.cpp" "h7/ex2.cpp"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -21,7 +21,9 @@
"./h7/build/ex2-asan", "./h7/build/ex2-asan",
"-a" "-a"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -24,7 +24,9 @@
"*.cpp", "*.cpp",
"*.h" "*.h"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },

View File

@ -24,7 +24,9 @@
"*.cpp", "*.cpp",
"*.h" "*.h"
], ],
"env": [], "env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"stdin": { "stdin": {
"content": "" "content": ""
}, },