forked from ucsd-cse15l-s23/list-examples-grader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrade.sh
42 lines (28 loc) · 998 Bytes
/
grade.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
CPATH='.:lib/hamcrest-core-1.3.jar:lib/junit-4.13.2.jar'
rm -rf student-submission
git clone $1 student-submission
echo 'Finished cloning'
cp student-submission/ListExamples.java ./
javac -cp $CPATH *.java
java -cp $CPATH org.junit.runner.JUnitCore TestListExamples
# CPATH=".;../lib/hamcrest-core-1.3.jar;../lib/junit-4.13.2.jar"
# rm -rf student-submission
# rm -rf grading-area
# mkdir grading-area
# git clone $1 student-submission
# echo 'Finished cloning'
# if [[ -f student-submission/ListExamples.java ]]
# then
# echo "The file ListExamples.java exists in the directory."
# else
# echo "The file ListExamples.java does not exist in the directory."
# exit 1
# fi
# cp -r *.java grading-area
# cp -r student-submission/*.java grading-area
# cd grading-area
# javac -cp $CPATH *.java
# # Draw a picture/take notes on the directory structure that's set up after
# # getting to this point
# # Then, add here code to compile and run, and do any post-processing of the
# # tests