[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit b98a543938ce552045a719adf130c93804ceb354
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits