feat: init
This commit is contained in:
commit
36039074a3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
joj3_result.json
|
31
conf.toml
Normal file
31
conf.toml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
skipGitea = true
|
||||||
|
[[stages]]
|
||||||
|
name = "keyword"
|
||||||
|
[stages.executor]
|
||||||
|
name = "sandbox"
|
||||||
|
[stages.executor.with.default]
|
||||||
|
args = ["bash", "-c", ". ./src/lib.sh; check_files ./src/assets"]
|
||||||
|
env = ["PATH=/usr/bin:/bin:/usr/local/bin"]
|
||||||
|
cpuLimit = 10_000_000_000
|
||||||
|
memoryLimit = 104_857_600
|
||||||
|
procLimit = 50
|
||||||
|
copyInCwd = true
|
||||||
|
copyOut = ["stdout", "stderr"]
|
||||||
|
[stages.executor.with.default.stdin]
|
||||||
|
content = ""
|
||||||
|
[stages.executor.with.default.stdout]
|
||||||
|
name = "stdout"
|
||||||
|
max = 65_536
|
||||||
|
[stages.executor.with.default.stderr]
|
||||||
|
name = "stderr"
|
||||||
|
max = 65_536
|
||||||
|
[stages.parser]
|
||||||
|
name = "keyword"
|
||||||
|
[stages.parser.with]
|
||||||
|
fullScore = 100
|
||||||
|
minScore = 0
|
||||||
|
files = ["stdout"]
|
||||||
|
endOnMatch = true
|
||||||
|
[[stages.parser.with.matches]]
|
||||||
|
keyword = "check files error"
|
||||||
|
score = 5
|
0
src/assets/0.txt
Normal file
0
src/assets/0.txt
Normal file
0
src/assets/1.txt
Normal file
0
src/assets/1.txt
Normal file
7
src/lib.sh
Normal file
7
src/lib.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# count file number in a given directory
|
||||||
|
function check_files() {
|
||||||
|
file_count=$(find $1 -type f | wc -l)
|
||||||
|
if [ $file_count -ge 1 ]; then
|
||||||
|
echo "check files error: more than 1 file found in $1!"
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user