diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1998-10-05 05:55:26 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1998-10-05 05:55:26 +0000 |
commit | 58147a461299efa9a31ee674d4f543902fc6e8b2 (patch) | |
tree | 7556ee37b507a63df0e338fb6668070031b6cfbb | |
parent | a7fa8d9ae219365215a83ae7ca6dc5478331ace3 (diff) |
interactive shell script to test for regressions
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@466 06663e23-700e-0410-b217-a244a6096597
-rwxr-xr-x | tools/regress.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/regress.sh b/tools/regress.sh new file mode 100755 index 000000000..64d2a64cf --- /dev/null +++ b/tools/regress.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# regression testing program. + +# get test file directory - we will run all files in that directory. +echo "Test files" +read TEST + +# get directories for the old (working) and new (not working) +# executable. + +echo "Old (working) executable directory" +read DIR1 + +echo "New (not working) executable directory" +read DIR2 + +# get the name of the executable for both old and new files +echo "executable name" +read EXE + +# get the device - we assume the chosen device from the new exe device +# list is available on the old exe. + +echo "choose an available device" +(cd $DIR1; $EXE) +read DEVICE + +# verify continuation - exit program if not ok. +echo $TEST +echo $DIR1 +echo $DIR2 +echo $EXE +echo $DEVICE + +echo "enter yes to continue" +read ANSWER + +if [ "$ANSWER" != yes ] +then + echo "bye" + exit 0 +fi + +# for all of the files in the test file directory +for file in $TEST +do + # print test file name + echo processing $file + # calculate checksum for new and old exe + CHECKSUM1=`(cd $DIR1; $EXE -Z@ -dNOPAUSE -sOutputFile="|sum" -sDEVICE=$DEVICE $file | grep "^[0-9]")` + CHECKSUM2=`(cd $DIR2; $EXE -Z@ -dNOPAUSE -sOutputFile="|sum" -sDEVICE=$DEVICE $file | grep "^[0-9]")` + # if the check sums are different report them and the file name. + if [ "$CHECKSUM1" != "$CHECKSUM2" ] + then + echo checksum1 $CHECKSUM1 + echo checksum2 $CHECKSUM2 + echo bad checksum $file + fi +done
\ No newline at end of file |