diff --git a/Makefile b/Makefile index 428ca5de5f6ae..91260bb681c71 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,14 @@ CYTHON ?= cython NOSETESTS ?= nosetests CTAGS ?= ctags +# skip doctests on 32bit python +BITS := $(shell python -c 'import struct; print(8 * struct.calcsize("P"))') + +ifeq ($(BITS),32) + NOSETESTS:=$(NOSETESTS) -c setup32.cfg +endif + + all: clean inplace test clean-ctags: @@ -28,9 +36,11 @@ test-code: in test-sphinxext: $(NOSETESTS) -s -v doc/sphinxext/ test-doc: +ifeq ($(BITS),64) $(NOSETESTS) -s -v doc/*.rst doc/modules/ doc/datasets/ \ doc/developers doc/tutorial/basic doc/tutorial/statistical_inference \ doc/tutorial/text_analytics +endif test-coverage: rm -rf coverage .coverage diff --git a/setup32.cfg b/setup32.cfg new file mode 100644 index 0000000000000..7294cb813fc8d --- /dev/null +++ b/setup32.cfg @@ -0,0 +1,22 @@ +# This config file is here to skip doctests on 32bit linux when running make or make test +# For newer versions of nose, we can simply use "NOSE_IGNORE_CONFIG_FILES", which +# we should do in the future. + +[aliases] +# python2.7 has upgraded unittest and it is no longer compatible with some +# of our tests, so we run all through nose +test = nosetests + +[nosetests] +# nosetests skips test files with the executable bit by default +# which can silently hide failing tests. +# There are no executable scripts within the scikit-learn project +# so let's turn the --exe flag on to avoid skipping tests by +# mistake. +exe = 1 +cover-html = 1 +cover-html-dir = coverage +cover-package = sklearn + +detailed-errors = 1 +with-doctest = 0