2013-07-31 06:35:55 +00:00
|
|
|
## Makefile.am -- an automake template for Makefile.in file
|
2017-05-27 06:22:15 +00:00
|
|
|
## Copyright (C) 2013 Stéphane Voltz and Sane Developers.
|
2013-07-31 06:35:55 +00:00
|
|
|
##
|
|
|
|
## 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
|
|
|
|
|
2013-08-16 18:39:23 +00:00
|
|
|
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
|
2013-07-31 06:35:55 +00:00
|
|
|
CLEANFILES = $(OUTFILES)
|
|
|
|
|
|
|
|
all: help
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "Use 'make check' to run the tests."
|
|
|
|
|
|
|
|
check: check.local
|
|
|
|
|
2017-05-27 05:27:22 +00:00
|
|
|
check.local:
|
2013-07-31 06:35:55 +00:00
|
|
|
@echo "**** Testing $(SANEDESC) with $(TESTFILE)"
|
2013-07-17 23:27:33 +00:00
|
|
|
@for mode in ascii html-backends-split html-mfgs xml statistics usermap db udev udev+acl udev+hwdb hwdb plist hal hal-new; \
|
2013-07-31 06:35:55 +00:00
|
|
|
do \
|
2013-08-16 18:39:23 +00:00
|
|
|
$(SANEDESC) -m $$mode -s $(srcdir)/data >$$mode.res ;\
|
2015-11-08 09:16:17 +00:00
|
|
|
if diff -I "[ 012][0-9]:[0-5][0-9]:[0-6][0-9] 20[0-9][0-9]" \
|
2019-06-29 08:31:25 +00:00
|
|
|
-I "sane-backends 1\.0\.[0-9]\+\([-0-9a-fgdirty]\+\)\?$$" \
|
2015-11-08 09:16:17 +00:00
|
|
|
$(srcdir)/data/$$mode.ref $$mode.res ; \
|
2013-07-31 06:35:55 +00:00
|
|
|
then \
|
2015-11-08 09:16:17 +00:00
|
|
|
echo "PASS: sane-desc -m $$mode -s $(srcdir)/data"; \
|
|
|
|
else \
|
|
|
|
echo "FAIL: sane-desc -m $$mode -s $(srcdir)/data"; \
|
2013-07-31 06:35:55 +00:00
|
|
|
exit 1 ;\
|
|
|
|
fi; \
|
|
|
|
done ;\
|
|
|
|
echo "================" ;\
|
|
|
|
echo "All tests passed" ;\
|
|
|
|
echo "================"
|