[tor-commits] [bridgedb/develop] Don't attempt to run coverage with PyPy.

isis at torproject.org isis at torproject.org
Thu Sep 22 13:20:24 UTC 2016


commit b98a543938ce552045a719adf130c93804ceb354
Author: Isis Lovecruft <isis at torproject.org>
Date:   Thu Sep 8 17:45:53 2016 +0000

    Don't attempt to run coverage with PyPy.
---
 Makefile | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Makefile b/Makefile
index 6c20fee..8aa92a3 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,16 @@
 TRIAL:=$(shell which trial)
 VERSION:=$(shell git describe)
 
+define PYTHON_WHICH
+import platform
+import sys
+sys.stdout.write(platform.python_implementation())
+endef
+
+PYTHON_IMPLEMENTATION:=$(shell python -c '$(PYTHON_WHICH)')
+PYTHON_PYTHON=CPython
+PYTHON_PYPY=PyPy
+
 all: uninstall clean install coverage-test
 
 test:
@@ -59,8 +69,13 @@ clean: clean-docs clean-coverage-html
 	-rm -rf _trial_temp
 
 coverage-test:
+ifeq ($(PYTHON_IMPLEMENTATION),PyPy)
+	@echo "Detected PyPy... not running coverage."
+	python setup.py test
+else
 	coverage run --rcfile=".coveragerc" $(TRIAL) ./test/test_*.py
 	coverage report --rcfile=".coveragerc"
+endif
 
 coverage-html:
 	coverage html --rcfile=".coveragerc"





More information about the tor-commits mailing list