diff --git a/full_test.sh b/full_test.sh index 19504c9..bed0028 100755 --- a/full_test.sh +++ b/full_test.sh @@ -1,3 +1,4 @@ #!/bin/bash ./build.sh -./test.sh +./test_sample.sh +./test_student_contributed.sh diff --git a/test.sh b/test.sh deleted file mode 100755 index 7060f44..0000000 --- a/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -FILENAME=$1 - -if [ -z "$1" ] ; then - echo "Running all test cases. Usage for individual test cases: test.sh FILENAME (inside src/test/data/pa1/sample/ folder)" - java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=s --test --dir src/test/data/pa1/sample/ - exit 1 -fi - -java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy \ - --pass=s --test src/test/data/pa1/sample/${FILENAME} diff --git a/test_py_file.sh b/test_py_file.sh new file mode 100755 index 0000000..4e47b37 --- /dev/null +++ b/test_py_file.sh @@ -0,0 +1,16 @@ +#!/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}" + +java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=sr \ + ${FILENAME} --out=${FILENAME}.ast.typed + +java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy \ + --pass=ss --test ${FILENAME} diff --git a/test_sample.sh b/test_sample.sh new file mode 100755 index 0000000..45a1a40 --- /dev/null +++ b/test_sample.sh @@ -0,0 +1,5 @@ +#!/bin/bash + + +echo "Running all test cases inside src/test/data/pa2/sample/ folder)" +java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=ss --test --dir src/test/data/pa2/sample/ diff --git a/test_student_contributed.sh b/test_student_contributed.sh new file mode 100755 index 0000000..34a9693 --- /dev/null +++ b/test_student_contributed.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Running all test cases inside src/test/data/pa2/sample/ folder)" +java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=ss --test --dir src/test/data/pa2/student_contributed/