diff --git a/ChangeLog b/ChangeLog index ef5168fa1..8a856e309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,9 @@ the files and directories of sane-backends. Fixed building instructions for tstbackend. Mentioned that sane_* symbols should be only used for API symbols. + * testsuite/Makefile.in testsuite/README testsuite/testfile.pnm: + Changed testsuite to use the test backend instead of the pnm + backend. This actually works with current sane-backends. 2006-01-03 Henning Meier-Geinitz diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 3daee39b8..15ebfb368 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -35,8 +35,9 @@ RANLIB = @RANLIB@ SCANIMAGE = ../frontend/scanimage TESTFILE = testfile.pnm -DEVICE = pnm:0 -OPTIONS = --filename=$(TESTFILE) +OUTFILE = outfile.pnm +DEVICE = test +OPTIONS = --mode Color --depth 16 --test-picture "Color pattern" --resolution 50 -y 20 -x 20 > $(OUTFILE) DISTCLEAN_FILES = @DISTCLEAN_FILES@ @@ -50,16 +51,24 @@ all: Makefile test: Makefile test.local test.local: - @echo "Testing $(SCANIMAGE) with device $(DEVICE)" - @if echo "Trying flatbed scanner" && \ - $(SCANIMAGE) -d $(DEVICE) $(OPTIONS) -T && \ - echo "Trying three pass flatbed scanner" && \ - $(SCANIMAGE) -d $(DEVICE) $(OPTIONS) --three-pass=yes -T && \ - echo "Trying hand scanner" && \ - $(SCANIMAGE) -d $(DEVICE) $(OPTIONS) --hand-scanner=yes -T ; \ - then echo ; echo ; echo "All tests passed" ; \ + @echo "**** Testing $(SCANIMAGE) with device $(DEVICE)" + @if echo "---> Trying flatbed scanner" && \ + $(SCANIMAGE) -d $(DEVICE) -T && \ + echo "<--- Flatbed scanner succeded" && \ + echo "---> Trying three pass flatbed scanner" && \ + $(SCANIMAGE) -d $(DEVICE) --mode Color --three-pass=yes -T && \ + echo "<--- Three pass scanner succeded" && \ + echo "---> Trying hand scanner" && \ + $(SCANIMAGE) -d $(DEVICE) --hand-scanner=yes -T && \ + echo "<--- Hand scanner succeded" && \ + echo "---> Checking 16 bit color mode" && \ + $(SCANIMAGE) -d $(DEVICE) $(OPTIONS) && \ + cmp -s $(TESTFILE) $(OUTFILE) && \ + echo "<--- 16 bit color mode succeded" && \ + rm $(OUTFILE) ; \ + then echo ; echo ; echo "**** All tests passed" ; \ else echo ; echo; \ - echo "Something failed (maybe pnm backend not enabled by configure?)";\ + echo "**** Something failed (maybe test backend not enabled by configure?)";\ fi # Generate new Makefile when something changes @@ -68,6 +77,7 @@ Makefile: Makefile.in ../config.status && CONFIG_FILES=testsuite/Makefile CONFIG_HEADERS= /bin/sh ./config.status clean: + rm -f $(OUTFILE) distclean: clean rm -f $(DISTCLEAN_FILES) diff --git a/testsuite/README b/testsuite/README index 792d16131..dbd32ed3b 100644 --- a/testsuite/README +++ b/testsuite/README @@ -8,5 +8,8 @@ everything without installing, to make sure a new distribution is function properly before the old one is replaced. If it isn't, please fix the bug. :-) -The current test needs the pnm backend. Hint: -"configure --enable-pnm-backend". +The current tests use the test backend to scan in flatbed, hand scanner and +three pass mode. Also a 16 bit color image is created and compared to the +"right" one. This test should detect any little/big endian issues in scanimage. + + diff --git a/testsuite/testfile.pnm b/testsuite/testfile.pnm index 13ad03aae..ba3db43ca 100644 Binary files a/testsuite/testfile.pnm and b/testsuite/testfile.pnm differ