]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/Makefile.in
no comma ...
[Evergreen.git] / Open-ILS / examples / Makefile.in
1 # vim:noet:ts=4
2 #
3 # This is a simple implementation of a test suite for XML validity
4 # (where possible) or well-formedness (if no schema is available)
5 # to ensure that our sample XML configuration files are reasonably
6 # clean.
7
8 TESTIDL := $(shell xmllint --noout --schema fm_IDL.xsd fm_IDL.xml 2>&1 | wc -l)
9 TESTOSRF := $(shell xmllint --noout opensrf.xml 2>&1 | wc -l)
10 TESTOSRFCORE := $(shell xmllint --noout opensrf_core.xml 2>&1 | wc -l)
11
12 test_idl:
13 TOTAL := $(TOTAL).
14 ifeq ($(TESTIDL), 1)
15 SUCCESS := $(SUCCESS).
16 else
17 $(warning fm_IDL.xml does not validate)
18 endif
19
20 test_osrf:
21 TOTAL := $(TOTAL).
22 ifeq ($(TESTOSRF), 1)
23 SUCCESS := $(SUCCESS).
24 else
25 $(warning opensrf.xml is not well-formed)
26 endif
27
28 test_osrf_core:
29 TOTAL := $(TOTAL).
30 ifeq ($(TESTOSRFCORE), 1)
31 SUCCESS := $(SUCCESS).
32 else
33 $(warning opensrf_core.xml is not well-formed)
34 endif
35
36 test: test_idl test_osrf test_osrf_core
37 # First we count the number of characters returned
38 SUCCESSES ?= $(shell echo $(SUCCESS) | wc -m )
39 FAILED ?= $(shell echo $(FAILURE) | wc -m )
40 TOTALED ?= $(shell echo $(TOTAL) | wc -m )
41 # Then we subtract one from the count to make it accurate
42 SUCCESSTESTS ?= $(shell echo $(SUCCESSES) - 1 | bc )
43 FAILEDTESTS ?= $(shell echo $(FAILED) -1 | bc )
44 TOTALTESTS ?= $(shell echo $(TOTALED) -1 | bc )
45 $(info Succesful tests: $(SUCCESSTESTS)/$(TOTALTESTS))
46 $(info Failed tests: $(FAILEDTESTS)/$(TOTALTESTS))
47
48