Makefile 947 Bytes
Newer Older
Qijiang Fan's avatar
Qijiang Fan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Makefile for testing hgsubversion

PYTHON=python

.PHONY: all check check-demandimport check-subvertpy check-swig

all:
	@echo "Use the following commands to build and install hgsubversion:"
	@echo
	@echo "$$ cd $(PWD)"
	@echo "$$ $(PYTHON) ./setup.py install"
	@echo
	@exit 1

check: check-demandimport check-subvertpy check-swig

check-demandimport:
	# verify that hgsubversion loads properly without bindings, but fails
	# when actually used
Qijiang Fan's avatar
Qijiang Fan committed
20
	! LC_ALL=C HGSUBVERSION_BINDINGS=none HGRCPATH=/dev/null \
Qijiang Fan's avatar
Qijiang Fan committed
21 22 23
	  hg --config extensions.hgsubversion=./hgsubversion \
	  version 2>&1 \
	  | egrep '(^abort:|failed to import extension)'
Qijiang Fan's avatar
Qijiang Fan committed
24
	LC_ALL=C HGSUBVERSION_BINDINGS=none HGRCPATH=/dev/null \
Qijiang Fan's avatar
Qijiang Fan committed
25 26 27 28 29 30 31 32 33
	  hg --config extensions.hgsubversion=./hgsubversion \
	  version --svn 2>&1 \
	  | egrep '(^abort:|failed to import extension)'

check-subvertpy:
	$(PYTHON) tests/run.py --all --bindings=subvertpy

check-swig:
	$(PYTHON) tests/run.py --all --bindings=swig