blob: 99af9db0f84c165560f305a2375ca549b5e544dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
## 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)"
@pass=true; \
for mode in ascii html-backends-split html-mfgs xml statistics usermap db udev udev+acl udev+hwdb hwdb plist hal hal-new; \
do \
$(SANEDESC) -m $$mode -s $(srcdir)/data >$$mode.res ;\
if diff -I "sane-backends 1\.0\.[0-9]\+\([-.0-9a-fgdirty]\+\)\?$$" \
$(srcdir)/data/$$mode.ref $$mode.res ; \
then \
echo "PASS: sane-desc -m $$mode -s $(srcdir)/data"; \
else \
echo "FAIL: sane-desc -m $$mode -s $(srcdir)/data"; \
pass=false ; \
fi; \
done ;\
if `$$pass`; then \
echo "================" ; \
echo "All tests passed" ; \
echo "================" ; \
else \
echo "========================" ; \
echo "One or more tests failed" ; \
echo "========================" ; \
exit 1; \
fi
|