#! /bin/sh # This script runs the test suite, and then reduces the data for # inspection. If you see "cpsa failed", something is very wrong. If # differences appear in the output, there might be a problem. # The following scripts in the tst directory might also serve as a # template for your needs, but probably not. Look at doc/cpsa.mk # first. # ./cpsashapesall # ./cpsagraphall CPSAFLAGS="+RTS -M512m -N -RTS" # Analyze the results of a CPSA run. analyze () { echo cpsadiff "$1.tst" "$1.txt" cabal run cpsadiff -v0 -- "$1.tst" "$1.txt" echo cpsagraph -o "$1.xhtml" "$1.txt" cabal run cpsagraph -v0 -- -o "$1.xhtml" "$1.txt" echo cpsashapes -o "${1}_shapes.txt" "$1.txt" cabal run cpsashapes -v0 -- -o "${1}_shapes.txt" "$1.txt" echo cpsagraph -o "${1}_shapes.xhtml" "${1}_shapes.txt" cabal run cpsagraph -v0 -- -o "${1}_shapes.xhtml" "${1}_shapes.txt" } for i in tst/*.scm do b=tst/`basename "$i" .scm` echo cpsa ${CPSAFLAGS} -o "$b.txt" "$i" cabal run cpsa -v0 -- ${CPSAFLAGS} -o "$b.txt" "$i" || echo cpsa failed. analyze "$b" done for i in tst/*.prot do b=tst/`basename "$i" .prot` echo cpsaprot "$i" '|' cpsa ${CPSAFLAGS} -o "$b.txt" cabal run cpsaprot -v0 -- "$i" | \ cabal run cpsa -v0 -- ${CPSAFLAGS} -o "$b.txt" || \ echo cpsa failed. analyze "$b" done for i in tst/*.lsp do b=tst/`basename "$i" .lsp` echo cpsa ${CPSAFLAGS} -o "$b.txt" "$i" cabal run cpsa -v0 -- ${CPSAFLAGS} -o "$b.txt" "$i" analyze "$b" done