]> granicus.if.org Git - graphviz/commitdiff
Use dot_builtins and diffimg from the build tree
authorellson <devnull@localhost>
Sun, 18 Nov 2007 02:45:53 +0000 (02:45 +0000)
committerellson <devnull@localhost>
Sun, 18 Nov 2007 02:45:53 +0000 (02:45 +0000)
Target is now:  make rtest

rtest/Makefile.am
rtest/rtest.sh

index 2e733bf3b6d4d8cfdcc04ed80f074fff0e0efa86..4d701b49918bc1d7e66beae4d7ac34a80f7c65f7 100644 (file)
@@ -1,4 +1,4 @@
-test: $(top_builddir)/cmd/dot/dot_builtins
+rtest: $(top_builddir)/cmd/dot/dot_builtins $(top_builddir)/contrib/diffimg/diffimg
        ./rtest.sh
 
 EXTRA_DIST = graphs nshare rtest.sh strps.awk tests.txt
index ba926f604f358dceb38e37f6443c03aeb5b500b3..81a76299cbd66982332145a23ac0fafae59e2b10 100755 (executable)
@@ -2,7 +2,6 @@
 #
 # Graphviz regression test driver
 #
-# Assumes the programs dot and diffimg are in PATH.
 # Also relies on strps.awk.
 #
 # TODO:
@@ -17,10 +16,9 @@ REFDIR=nshare          # Directory for expected test output
 GENERATE=              # If set, generate test data
 VERBOSE=               # If set, give verbose output
 NOOP=                  # If set, just print list of tests
-DOT=dot                # Installed dot with dynamic plugins
-#DOT=../../cmd/dot/dot # build tree version, but has no plugins
-#DOT=../../cmd/dot/dot_static   # build tree version with builtin set of plugins
+DOT=../cmd/dot/dot_builtins # build tree version with a builtin set of plugins
                       # should be $(top_builddir)/cmd/dot/dot_static
+DIFFIMG=../contrib/diffimg/diffimg # build tree version
 
 TESTNAME=   # name of test
 GRAPH=      # graph specification
@@ -147,7 +145,7 @@ function doDiff
       diff -q $TMPFILE2 $TMPFILE1 > /dev/null 
       ;;
     png )
-      diffimg $FILE2 $FILE1 > /dev/null 
+      $DIFFIMG $FILE2 $FILE1 > /dev/null 
       ;;
     * )
       diff -q $FILE2 $FILE1 > /dev/null 
@@ -320,12 +318,19 @@ then
   mkdir $OUTDIR
 fi
 
-if ! whence diffimg > /dev/null
+if [[ ! -x $DOT ]]
 then
-  print -u 2 "diffimg program is not in your PATH"
+  print -u 2 "$DOT program is not executable"
   exit 1
 fi
 
+if [[ ! -x $DIFFIMG ]]
+then
+  print -u 2 "$DIFFIMG program is not executable"
+  exit 1
+fi
+
+
 exec 3< $TESTFILE
 while readTest
 do