Штуки
Some checks failed
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 1m12s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Has been cancelled
Some checks failed
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 1m12s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Has been cancelled
This commit is contained in:
35
exam-queue-17/scripts/gen-answer.sh
Normal file
35
exam-queue-17/scripts/gen-answer.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
if [ "$#" -ne "4" ]; then
|
||||
read
|
||||
fi
|
||||
if [ "$1" = "" ]; then
|
||||
read
|
||||
fi
|
||||
if [ "$2" = "" ]; then
|
||||
read
|
||||
fi
|
||||
if [ ! -f "$1" ]; then
|
||||
read
|
||||
fi
|
||||
echo "Running validator"
|
||||
wine files/towin.exe "$1" | wine files/val.exe --testset "$3" --group "$4"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
read
|
||||
fi
|
||||
echo "Running solution valavshonok_OK.cpp"
|
||||
wine solutions/valavshonok_OK.exe < "$1" > output.txt
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Solution returned non-zero exit code"
|
||||
read
|
||||
fi
|
||||
if [ ! -f "output.txt" ]; then
|
||||
echo "Solution didn't produced output"
|
||||
read
|
||||
fi
|
||||
mv output.txt "$2"
|
||||
echo "Running checker"
|
||||
wine check.exe "$1" "$2" "$2"
|
||||
if [ "$?" -ne "0" ] && [ "$?" -ne "7" ]; then
|
||||
echo "Checker exit code is not equal to 0 and 7"
|
||||
read
|
||||
fi
|
||||
Reference in New Issue
Block a user