From: Paul Brossier Date: Sun, 17 Sep 2017 19:22:32 +0000 (+0200) Subject: Merge branch 'master' into coveralls X-Git-Tag: 0.4.6~21 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=dfa4095daba45357b53d619f55dd3b90085ef792;hp=5eaed62bb6f6431a9972e0461c0e83d98ab55348 Merge branch 'master' into coveralls --- diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..66ded4e3 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = True +source = aubio diff --git a/.travis.yml b/.travis.yml index 73aef644..73035347 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,17 +97,27 @@ install: - travis_retry make getwaf expandwaf deps_python - which pip - pip --version + - pip install python-coveralls script: - make create_test_sounds - | if [[ -z "$AUBIO_NOTESTS" ]]; then make test_lib_python_clean - make test_python_only_clean + export NOSE2="coverage run --source=aubio `which nose2`" + make test_python_only else make test_lib_only_clean fi; +after_success: + - | + if [[ -z "$AUBIO_NOTESTS" ]]; then + sed 's|\"\([^"]*\)/\(aubio\/\)\([^"]*\.py\)"|"'$PWD'/python/lib/aubio/\3"|g' .coverage > .coverage.remap + mv -f .coverage.remap .coverage + coveralls + fi + notifications: irc: channels: diff --git a/Makefile b/Makefile index 7e9226e6..8dcbee8b 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,9 @@ INCLUDEDIR?=$(PREFIX)/include DATAROOTDIR?=$(PREFIX)/share MANDIR?=$(DATAROOTDIR)/man +# default nose2 command +NOSE2?=nose2 -N 4 --verbose + SOX=sox TESTSOUNDS := python/tests/sounds @@ -135,9 +138,9 @@ test_python: export LD_LIBRARY_PATH=$(DESTDIR)/$(LIBDIR) test_python: export PYTHONPATH=$(PYDESTDIR)/$(LIBDIR) test_python: local_dylib # run test with installed package - ./python/tests/run_all_tests --verbose - # also run with nose, multiple processes - nose2 -N 4 + # ./python/tests/run_all_tests --verbose + # run with nose2, multiple processes + $(NOSE2) clean_python: ./setup.py clean