forked from CNS-OIST/STEPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (33 loc) · 1.53 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Build wrapper for testing.
# Python module dependencies for testing: numpy, scipy, matplotlib, unittest2
# distutils is br0ken; contents of builddir will ALL be removed by our clean target
builddir=./tmp
libdir=./install
#
PYTHON=python
SETUPOPTS=build --build-base=${builddir} install_lib --install-dir=${libdir}
NOSETESTS=nosetests
.PHONY: all steps clean test test-unit test-validation pythonpath
all: steps
steps:
mkdir -p '${libdir}'
env PYTHONPATH="${abspath ${libdir}}:$$PYTHONPATH" ${PYTHON} setup.py ${SETUPOPTS}
pythonpath:
@echo ${abspath ${libdir}}:$$PYTHONPATH
test: test-unit test-validation
$(MAKE) test-reports/test-results.xml
test-unit: steps
env PYTHONPATH="${abspath ${libdir}}:$$PYTHONPATH" ${NOSETESTS} -v --with-xunit --xunit-file=${abspath test-reports}/nose-unit-tests.xml --all-modules -w test/unit_test model_test
test-validation: steps
env PYTHONPATH="${abspath ${libdir}}:$$PYTHONPATH" ${NOSETESTS} -v --with-xunitmp --xunitmp-file=${abspath test-reports}/nose-validation-tests.xml --all-modules --processes=-1 --process-timeout=600 -w test validation
# Allow merging of test results independently of running tests
test-reports/test-results.xml: test/test-results-in.xml \
test/collate-junit.xml \
test-reports/nose-unit-tests.xml test-reports/nose-validation-tests.xml
xsltproc --path test-reports test/collate-junit.xml $< > $@
clean:
rm -rf '${builddir}'
testclean:
rm -f test-reports/*.xml
realclean: clean testclean
rm -rf '${libdir}/steps'