CS 453 Recitation — Regression Testing
Starting with PA2b, you will be producing a compiler
written in Haskell that compiles a subset of the MeggyJava
language into AVR assembly code. As you are adding to the
compiler's functionality, it is best to perform regression
tests to ensure that you have not broken any of the previous
capabilities. Additionally, the provided regression testing
script is what will be used to do grading.
How the regression testing system works:
- Iterate through every filename.java file in the WorkingTestCases/ subdirectory. For each file...
- Compile with your compiler
- Run through MJSim
- Compile the .java file with javac
- Run in Java only mode
- Compare MJSim and Java results
- You can optionally have filename.arg_opts in the WorkingTestCases/ for each filename.java.
For this recitation, do the following:
- Create the following directory structure:
PA2b/
IncludeFile.hs
avrH.rtl.s
TestHaskellMeggy/
regress.sh
MJSIM.jar
WorkingTestCases/
PA2bluedotNoComm.java
meggy/
Meggy.java
MeggyException.java
arg_opts
by creating those directories and then populating them with theses
files: Meggy.java,
MeggyException.java,
arg_opts, IncludeFile.hs,
avrH.rtl.s, regress.sh, MJSIM.jar, and
PA2bluedotNoComm.java.
- Run "cabal update" and "cabal install include-file" to update your Haskell packages and install the Development.IncludeFile module.
- Compile the IncludeFile.hs into an mjc executable.
See the comments in the IncludeFile.hs file header.
- Change directory into TestHaskellMeggy/ and run the
regression script: ./regress.sh. (You may need to run "chmod u+x" regress.sh for regress.sh to execute)
- Also run mjc by itself to see what it is doing.
You now have regression testing working. Your regression test fails because
IncludeFile.hs does not compile MeggyJava yet, it just spits out the AVR
prologue that is required by MJSIM.jar.
mstrout@cs.colostate.edu
.... February 5, 2015