Remove the dependancy on python2. Also, allow tests to be run on cygwin by checking for it, and converting unix2dos line endings.
parent
830b2403e2
commit
5cbdd915c7
|
@ -1,9 +1,15 @@
|
||||||
# GNUMakefile for test
|
# GNUMakefile for test
|
||||||
|
|
||||||
|
UNAME_S := $(shell uname -o)
|
||||||
|
CNVTXT=:
|
||||||
|
ifeq ($(UNAME_S),Cygwin)
|
||||||
|
CNVTXT=unix2dos
|
||||||
|
endif
|
||||||
|
|
||||||
RM=rm -f
|
RM=rm -f
|
||||||
CMP=:
|
CMP=:
|
||||||
ECHO=echo
|
ECHO=echo
|
||||||
PYTHON=python2
|
PYTHON=python
|
||||||
|
|
||||||
PDF2TXT=PYTHONPATH=.. $(PYTHON) ../tools/pdf2txt.py -p1 -V
|
PDF2TXT=PYTHONPATH=.. $(PYTHON) ../tools/pdf2txt.py -p1 -V
|
||||||
|
|
||||||
|
@ -40,10 +46,13 @@ tests:
|
||||||
for i in $(TESTS); do \
|
for i in $(TESTS); do \
|
||||||
$(ECHO) $$i; \
|
$(ECHO) $$i; \
|
||||||
$(PDF2TXT) -t html -o $$i.html $$i.pdf || exit 1; \
|
$(PDF2TXT) -t html -o $$i.html $$i.pdf || exit 1; \
|
||||||
|
$(CNVTXT) $$i.html || exit 1; \
|
||||||
$(CMP) $$i.html $$i.html.ref || exit 1; \
|
$(CMP) $$i.html $$i.html.ref || exit 1; \
|
||||||
$(PDF2TXT) -t xml -o $$i.xml $$i.pdf || exit 1; \
|
$(PDF2TXT) -t xml -o $$i.xml $$i.pdf || exit 1; \
|
||||||
|
$(CNVTXT) $$i.xml || exit 1; \
|
||||||
$(CMP) $$i.xml $$i.xml.ref || exit 1; \
|
$(CMP) $$i.xml $$i.xml.ref || exit 1; \
|
||||||
$(PDF2TXT) -t text -o $$i.txt $$i.pdf || eixt 1; \
|
$(PDF2TXT) -t text -o $$i.txt $$i.pdf || exit 1; \
|
||||||
|
$(CNVTXT) $$i.txt || exit 1; \
|
||||||
$(CMP) $$i.txt $$i.txt.ref || exit 1; \
|
$(CMP) $$i.txt $$i.txt.ref || exit 1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue