Makefile.SMP2 1.6 KB
Newer Older
1
include common.mk
2

3 4 5 6
# Python3.5 includes an older version of typing, which by default has priority over
# the one installed in $HOME/.local via setup.py.
#
# To address this, we find where our pip-installed typing lives:
7
TYPING_FOLDER:=$(shell pip3 show typing 2>/dev/null | grep ^Location | sed 's,^.*: ,,')
8
export PYTHONPATH:=..:${TYPING_FOLDER}
9

10 11
all:
	make clean
12 13 14 15 16 17 18
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.asn2dataModel -o . -toSMP2 DataTypesSimulink.asn >/dev/null
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.smp2asn >/dev/null 2>&1 ; exit 0
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.smp2asn -h >/dev/null 2>&1 ; exit 0
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.smp2asn -z >/dev/null 2>&1 ; exit 0
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.smp2asn -o smp2.asn -a nonexisting.asn nonexisting.cat >/dev/null 2>&1 ; exit 0
	LANG=C LC_ALL=C python3 -m coverage run -a -m dmt.smp2asn -o smp2.asn -a DataTypesSimulink.asn -v -p datatypessimulink.cat >/dev/null 2>&1 || exit 1
	LANG=C LC_ALL=C ${COVERAGE} annotate -d . ../dmt/smp2asn.py ../dmt/commonPy/*.py || exit 1
19 20 21
ifneq ($(CIRCLECI),)
	./checkCoverage.pl ___dmt_smp2asn.py,cover || { echo smp2asn.py failed... ; cp __dmt_smp2asn.py,cover ${CIRCLE_ARTIFACTS} ; exit 1 ; }
else
22
	./checkCoverage.pl ___dmt_smp2asn.py,cover || { echo smp2asn.py ; ./review.pl ___dmt_smp2asn.py,cover | less -RS ; exit 1 ; }
23
endif
24
	# ./checkCoverage.pl ___dmt_commonPy_commonSMP2.py,cover || { echo commonSMP2.py ; ./review.pl ___dmt_commonPy_commonSMP2.py,cover | less -RS ; exit 1 ; }
25 26

clean:
27
	${COVERAGE} erase
28
	rm -f ___*.py,cover smp2.asn datatypessimulink.cat