summaryrefslogtreecommitdiff
path: root/pcl/tools/regress.sh
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2013-07-23 16:24:19 +0100
committerChris Liddell <chris.liddell@artifex.com>2015-07-20 18:21:17 +0100
commit6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a (patch)
tree5c2a1c671c1d4521f8a770d1e69e3d4342718030 /pcl/tools/regress.sh
parent7fd9e0be26e67c36f87733bc89ea07dc26d9f839 (diff)
downloadghostpdl-6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a.tar.gz
Commit of build_consolidation branch
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.
Diffstat (limited to 'pcl/tools/regress.sh')
-rwxr-xr-xpcl/tools/regress.sh70
1 files changed, 70 insertions, 0 deletions
diff --git a/pcl/tools/regress.sh b/pcl/tools/regress.sh
new file mode 100755
index 000000000..7baf2bcfc
--- /dev/null
+++ b/pcl/tools/regress.sh
@@ -0,0 +1,70 @@
+#!/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 available device(s) use a space to delimit devices"
+(cd $DIR1; $EXE)
+read DEVICES
+
+# get the resolution
+echo "resolution"
+read RESOLUTION
+
+# verify continuation - exit program if not ok.
+echo $TEST
+echo $DIR1
+echo $DIR2
+echo $EXE
+echo $DEVICES
+echo $RESOLUTION
+
+echo "enter yes to continue"
+read ANSWER
+
+if [ "$ANSWER" != yes ]
+then
+ echo "bye"
+ exit 0
+fi
+
+# for all devices
+for device in $DEVICES
+do
+ echo processing $device
+ # 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. Note we always force banding.
+ CHECKSUM1=`(cd $DIR1; $EXE -Z@ -r$RESOLUTION -K40000 -dBATCH -dNOPAUSE -dMaxBitmap=200000 -dBufferSpace=200000 -sOutputFile="|sum" -sDEVICE=$device $file | grep "^[0-9]" 2> /dev/null)`
+ CHECKSUM2=`(cd $DIR2; $EXE -Z@ -r$RESOLUTION -K40000 -dBATCH -dNOPAUSE -dMaxBitmap=200000 -dBufferSpace=200000 -sOutputFile="|sum" -sDEVICE=$device $file | grep "^[0-9]" 2> /dev/null)`
+ # 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
+done \ No newline at end of file