comparison Makefile @ 683:4589d48c9e1b

tests: add a Makefile for easily running the tests. The Makefile tests one thing which isn't easily tested from within Python; that the svnwrap modules aren't loaded for irrelevant commands.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 03 Sep 2010 00:35:12 +0200
parents
children 055f9254d790
comparison
equal deleted inserted replaced
682:52fbb272a147 683:4589d48c9e1b
1 # Makefile for testing hgsubversion
2
3 PYTHON=python
4
5 .PHONY: all check check-demandimport check-subvertpy check-swig
6
7 all:
8 @echo "Use the following commands to build and install hgsubversion:"
9 @echo
10 @echo "$$ cd $(PWD)"
11 @echo "$$ $(PYTHON) ./setup.py install"
12 @echo
13 @exit 1
14
15 check: check-demandimport check-subvertpy check-swig
16
17 check-demandimport:
18 # verify that hgsubversion loads properly without bindings, but fails
19 # when actually used
20 ! LC_ALL=C HGSUBVERSION_BINDINGS=none \
21 hg --config extensions.hgsubversion=./hgsubversion \
22 version 2>&1 \
23 | egrep '(^abort:|failed to import extension)'
24 LC_ALL=C HGSUBVERSION_BINDINGS=none \
25 hg --config extensions.hgsubversion=./hgsubversion \
26 version --svn 2>&1 \
27 | egrep '(^abort:|failed to import extension)'
28
29 check-subvertpy:
30 $(PYTHON) tests/run.py --all --bindings=subvertpy
31
32 check-swig:
33 $(PYTHON) tests/run.py --all --bindings=swig