diff --git a/README.md b/README.md index 917cea3..0a28e14 100644 --- a/README.md +++ b/README.md @@ -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. - Submit your solution to . - Read the documentation at . +- 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 ` + ``` + - 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. diff --git a/scripts/grade.sh b/scripts/grade.sh index eacee07..e0d8be5 100755 --- a/scripts/grade.sh +++ b/scripts/grade.sh @@ -16,6 +16,14 @@ run_linters || exit 1 # Executes test for each runner. echo "Running with $RUNNER..." +if [ $# != 1 ] + then + echo "===============================" + echo "Invalid number. $# arguments given." + echo "Usage: ./grade.sh " + echo "Example: ./grade.sh 1" + exit 1 +fi TEST_NAME=$(printf "TEST%02d" $1) case $TEST_NAME in TEST01) @@ -102,4 +110,5 @@ esac # Runs tests. SCORE=$(run_tests) -echo Your score: $SCORE +NUM_TESTS=${#TESTS[@]} +echo Your score: ${SCORE}/${NUM_TESTS}