You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/test_py_file.sh

19 lines
582 B

#!/bin/bash
FILENAME=$1
if [ -z "$1" ] ; then
echo "Usage for individual test cases: test.sh FILEPATH, where FILEPATH is the location of the python file"
exit 1
fi
echo "Testing file ${FILENAME}"
echo "Generating .ast.typed file using student parser and reference analyzer"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=sr \
${FILENAME} --out=${FILENAME}.ast.typed
echo "Comparing the pervious output with student parser and student analyzer"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy \
--pass=ss --test ${FILENAME}