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:

  1. Iterate through every filename.java file in the WorkingTestCases/ subdirectory. For each file...
    1. Compile with your compiler
    2. Run through MJSim
    3. Compile the .java file with javac
    4. Run in Java only mode
    5. Compare MJSim and Java results
  2. You can optionally have filename.arg_opts in the WorkingTestCases/ for each filename.java.

For this recitation, do the following:

  1. 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.

  2. Run "cabal update" and "cabal install include-file" to update your Haskell packages and install the Development.IncludeFile module.

  3. Compile the IncludeFile.hs into an mjc executable. See the comments in the IncludeFile.hs file header.

  4. 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)

  5. 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