diff options
-rw-r--r-- | servant.py | 19 | ||||
-rw-r--r-- | tox.ini | 11 |
2 files changed, 25 insertions, 5 deletions
diff --git a/servant.py b/servant.py new file mode 100644 index 00000000..33c0d904 --- /dev/null +++ b/servant.py @@ -0,0 +1,19 @@ +import os +import sys +import zipfile + +from nose import core as nose_core + +if sys.argv[1] == "remove_extension": + try: + os.remove("coverage/tracer.so") + except OSError: + pass + +elif sys.argv[1] == "test_with_tracer": + os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2] + del sys.argv[1:3] + nose_core.main() + +elif sys.argv[1] == "zip_mods": + zipfile.ZipFile("test/zipmods.zip", "w").write("test/covmodzip1.py", "covmodzip1.py") @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py24, py25, py26, py27, py31, py32, py33, pypy [testenv] setenv = PYTHONPATH=test/eggsrc @@ -13,15 +13,16 @@ commands = {envpython} setup.py develop # Create test/zipmods.zip - make testdata + {envpython} servant.py zip_mods # Remove tracer.so so that we can test the PyTracer - rm {toxinidir}/coverage/tracer.so + {envpython} servant.py remove_extension # Test with the PyTracer - env COVERAGE_TEST_TRACER="py" nosetests -w {toxinidir} + {envpython} servant.py test_with_tracer py # Build tracer.so and test with the CTracer {envpython} setup.py build_ext --inplace - env COVERAGE_TEST_TRACER="c" nosetests -w {toxinidir} + {envpython} servant.py test_with_tracer c + deps = nose |