forked from ucsd-cse15l-s23/list-examples-grader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrade.sh
34 lines (23 loc) · 869 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
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'
var=$(find . -type f -name "ListExamples.java")
if [ -f ./student-submission/ListExamples.java ]
then
cp student-submission/*.java grading-area/
cp -r lib grading-area
cp -r TestListExamples.java grading-area
else
echo "Tests were not found!"
exit
fi
cd grading-area
javac -cp ".;lib/hamcrest-core-1.3.jar;lib/junit-4.13.2.jar" *.java
java -cp ".;lib/junit-4.13.2.jar;lib/hamcrest-core-1.3.jar" org.junit.runner.JUnitCore TestListExamples
# 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