add testsuite for sane-desc

- add a tools sudbir in testsuite
- add a desc test file
- record test references
- add check in Makefile to run and compare output
merge-requests/1/head
Stphane Voltz 2013-07-31 08:35:55 +02:00
rodzic 4029979bd9
commit fdadecc509
19 zmienionych plików z 106217 dodań i 4 usunięć

3
configure vendored
Wyświetl plik

@ -18095,7 +18095,7 @@ fi
DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#\"* \".\\#\"*"
ac_config_files="$ac_config_files Makefile lib/Makefile sanei/Makefile frontend/Makefile japi/Makefile backend/Makefile include/Makefile doc/Makefile po/Makefile testsuite/Makefile testsuite/sanei/Makefile tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf"
ac_config_files="$ac_config_files Makefile lib/Makefile sanei/Makefile frontend/Makefile japi/Makefile backend/Makefile include/Makefile doc/Makefile po/Makefile testsuite/Makefile testsuite/sanei/Makefile testsuite/tools/Makefile tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf"
ac_config_files="$ac_config_files tools/sane-config"
@ -19168,6 +19168,7 @@ do
"po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"testsuite/sanei/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/sanei/Makefile" ;;
"testsuite/tools/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/tools/Makefile" ;;
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"doc/doxygen-sanei.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen-sanei.conf" ;;
"doc/doxygen-genesys.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen-genesys.conf" ;;

Wyświetl plik

@ -772,7 +772,8 @@ AC_SUBST(DISTCLEAN_FILES)
AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \
japi/Makefile backend/Makefile include/Makefile doc/Makefile \
po/Makefile testsuite/Makefile testsuite/sanei/Makefile tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf])
po/Makefile testsuite/Makefile testsuite/sanei/Makefile testsuite/tools/Makefile \
tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf])
AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config])
AC_CONFIG_FILES([tools/sane-backends.pc])
AC_OUTPUT

Wyświetl plik

@ -4,7 +4,7 @@
## This file is part of the "Sane" build infra-structure. See
## included LICENSE file for license information.
SUBDIRS = sanei
SUBDIRS = sanei tools
SCANIMAGE = ../frontend/scanimage$(EXEEXT)
TESTFILE = $(srcdir)/testfile.pnm

Wyświetl plik

@ -258,7 +258,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = sanei
SUBDIRS = sanei tools
SCANIMAGE = ../frontend/scanimage$(EXEEXT)
TESTFILE = $(srcdir)/testfile.pnm
OUTFILE = outfile.pnm

Wyświetl plik

@ -0,0 +1,39 @@
## Makefile.am -- an automake template for Makefile.in file
## Copyright (C) 2013 Stéphane Voltz and Sane Developers.
##
## This file is part of the "Sane" build infra-structure. See
## included LICENSE file for license information.
all:
@echo "run 'make check' to run tests"
SANEDESC = ../../tools/sane-desc$(EXEEXT)
TESTFILE = $(srcdir)/data/testfile.desc
OUTFILES = *.res
DEVICE = test
EXTRA_DIST = data/testfile.desc
CLEANFILES = $(OUTFILES)
all: help
help:
@echo "Use 'make check' to run the tests."
check: check.local
check.local:
@echo "**** Testing $(SANEDESC) with $(TESTFILE)"
@for mode in ascii html-backends-split html-mfgs xml statistics usermap db udev udev+acl plist hal hal-new; \
do \
echo "PASS: sane-desc -m $$mode"; \
$(SANEDESC) -m $$mode -s data >$$mode.res ;\
if ! diff --ignore-matching-lines="..:..:.. 20[0-9][0-9]" data/$$mode.ref $$mode.res ; \
then \
echo "**** File generated for $$mode modee is different from reference" ;\
exit 1 ;\
fi; \
done ;\
echo "================" ;\
echo "All tests passed" ;\
echo "================"

Wyświetl plik

@ -0,0 +1,10 @@
TOOLS test suite
================
This directory contains test for tools programs. They are run by 'make check'.
sane-desc
---------
sane-desc is ran for all known modes, using a test 'desc' file.
The output is compared to a reference file for the same mode. Test fails
if they are different.

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Wyświetl plik

@ -0,0 +1,20 @@
Number of known devices:
Scanners:
Total: 2337
Supported: 1205 (complete: 417, good: 662, basic: 101, minimal: 25)
Untested: 325
Unsupported: 482
Still cameras:
Total: 5
Supported: 5 (complete: 1, good: 2, basic: 2, minimal: 0)
Untested: 0
Unsupported: 0
Video cameras:
Total: 11
Supported: 3 (complete: 0, good: 1, basic: 0, minimal: 2)
Untested: 3
Unsupported: 2
Meta backends:
Total: 2
API backends:
Total: 5

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff