grade.sh
grading script on multiple sample student submissions.set -e
$CPATH = ".:lib/hamcrest-core-1.3.jar/junit-4.13.2.jar"
rm -rf student-submission
git clone $1 student-submission
cd student-submission/
if [[-f "ListExamples.java"]]
echo "ListExamples.java submitted! Correct file." + \n +
"Correct File Submission: 1.0/1.0"
else
echo "Wrong file submitted. Need to submit ListExamples.java.
WRONG FILE!" + \n + "Wrong File Submission: 0.0/1.0"
exit 1
fi
if [[$? -eq 0]]
then
echo "COMPILE SUCCESS"
else
echo "COMPILE ERROR"
exit 1
fi
javac -cp $CPATH *.java
java -cp $CPATH org.junit.runner.JUnitCore TestListExamples > results.txt
For this, I tried running my grade.sh
on a sample student repository, but I kept getting this error about a particular command '\r'
not found, as we can see in the screenshot. I went on Piazza and saw a post saying what you should do to fix this ( @507 ). I tried doing what the person specified (going on the terminal, clicking the + sign, the down arrow, and selecting bash
in the terminal.) However, upon doing this, I got yet another error (shown below).
EXPLAINING THE PART WHERE I GOT STUCK (ERROR 2):
grade.sh
in my local server through bash
, but even if I try switching to the remote server while in bash
, I will get the error I described above. This is where I got stuck.