summaryrefslogtreecommitdiff
path: root/testsuite/tools/Makefile.am
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
commit6e9c41a892ed0e0da326e0278b3221ce3f5713b8 (patch)
tree2e301d871bbeeb44aa57ff9cc070fcf3be484487 /testsuite/tools/Makefile.am
Initial import of sane-backends version 1.0.24-1.2
Diffstat (limited to 'testsuite/tools/Makefile.am')
-rw-r--r--testsuite/tools/Makefile.am43
1 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/tools/Makefile.am b/testsuite/tools/Makefile.am
new file mode 100644
index 0000000..178041b
--- /dev/null
+++ b/testsuite/tools/Makefile.am
@@ -0,0 +1,43 @@
+## 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 data/ascii.ref data/db.ref data/hal-new.ref \
+ data/hal.ref data/html-backends-split.ref data/html-mfgs.ref \
+ data/hwdb.ref data/plist.ref data/statistics.ref \
+ data/udev+acl.ref data/udev+hwdb.ref data/udev.ref \
+ data/usermap.ref data/xml.ref
+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 udev+hwdb hwdb plist hal hal-new; \
+ do \
+ echo "PASS: sane-desc -m $$mode -s $(srcdir)/data"; \
+ $(SANEDESC) -m $$mode -s $(srcdir)/data >$$mode.res ;\
+ if ! diff --ignore-matching-lines="..:..:.. 20[0-9][0-9]" $(srcdir)/data/$$mode.ref $$mode.res ; \
+ then \
+ echo "**** File generated for $$mode mode is different from reference" ;\
+ exit 1 ;\
+ fi; \
+ done ;\
+ echo "================" ;\
+ echo "All tests passed" ;\
+ echo "================"