Merge pull request #5 from woojinnn/grade_script

Grade scripts
This commit is contained in:
Haechan An
2023-08-27 14:41:15 +09:00
committed by GitHub
2 changed files with 22 additions and 1 deletions

View File

@@ -138,6 +138,18 @@ Make sure that you're capable of using the following development tools:
- We'll announce **all** assignments before the semester begins. - We'll announce **all** assignments before the semester begins.
- Submit your solution to <https://gg.kaist.ac.kr/course/17>. - Submit your solution to <https://gg.kaist.ac.kr/course/17>.
- Read the documentation at <https://cp.kaist.ac.kr/cs220/cs220/>. - Read the documentation at <https://cp.kaist.ac.kr/cs220/cs220/>.
- We provide grading scripts for each assignment. Before submission, you can check your grade with your machine.
- Grading scripts are located at `scripts/` directory.
- You can run the grading script with the following command:
```bash
$ `scripts/grade.sh <assignment number>`
```
- For example,
- If you want to grade `assignment9`, run the following command:
```bash
$ cd scripts
$ ./grade.sh 9
```
- You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters. - You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters.

View File

@@ -16,6 +16,14 @@ run_linters || exit 1
# Executes test for each runner. # Executes test for each runner.
echo "Running with $RUNNER..." echo "Running with $RUNNER..."
if [ $# != 1 ]
then
echo "==============================="
echo "Invalid number. $# arguments given."
echo "Usage: ./grade.sh <test_number>"
echo "Example: ./grade.sh 1"
exit 1
fi
TEST_NAME=$(printf "TEST%02d" $1) TEST_NAME=$(printf "TEST%02d" $1)
case $TEST_NAME in case $TEST_NAME in
TEST01) TEST01)
@@ -102,4 +110,5 @@ esac
# Runs tests. # Runs tests.
SCORE=$(run_tests) SCORE=$(run_tests)
echo Your score: $SCORE NUM_TESTS=${#TESTS[@]}
echo Your score: ${SCORE}/${NUM_TESTS}