Commit a4c994c7 authored by Jason Madden's avatar Jason Madden

Combine the coverage files to the right location.

parent ec2d1f4e
......@@ -56,12 +56,18 @@ travistest:
${PYTHON} -c 'import greenlet; print(greenlet, greenlet.__version__)'
${PYTHON} setup.py install
# develop, not install, so that coverage doesn't think it's part of the stdlib
${PYTHON} setup.py develop
make bench
# combine after each step so we don't lose anything (append is the default). This also
# moves the coverage file from greentest to the root.
cd greentest && GEVENT_RESOLVER=thread ${PYTHON} testrunner.py --config ../known_failures.py
coverage combine greentest/
cd greentest && GEVENT_RESOLVER=ares GEVENTARES_SERVERS=8.8.8.8 ${PYTHON} testrunner.py --config ../known_failures.py --ignore tests_that_dont_use_resolver.txt
coverage combine greentest/
cd greentest && GEVENT_FILE=thread ${PYTHON} testrunner.py --config ../known_failures.py `grep -l subprocess test_*.py`
coverage combine greentest/
toxtest:
cd greentest && GEVENT_RESOLVER=thread python testrunner.py --config ../known_failures.py
......
......@@ -118,22 +118,24 @@ def run_many(tests, expected=(), failfast=False):
report(total, failed, passed, took=time.time() - start, expected=expected)
def discover(tests=None, ignore=None, coverage=False):
def discover(tests=None, ignore=(), coverage=False):
if isinstance(ignore, six.string_types):
ignore = load_list_from_file(ignore)
ignore = set(ignore or [])
ignore = set(ignore or ())
if coverage:
ignore.update(IGNORE_COVERAGE)
print("Ignoring", ignore)
if not tests:
tests = set(glob.glob('test_*.py')) - set(['test_support.py'])
if ignore:
# Always ignore the designated list, even if tests were specified
# on the command line. This fixes a nasty interaction with test__threading_vs_settrace.py
# being run under coverage when 'grep -l subprocess test*py' is used to list the tests
# to run.
tests -= ignore
tests = sorted(tests)
if coverage:
print("Tests", tests)
to_process = []
default_options = {'timeout': TIMEOUT}
......@@ -272,6 +274,7 @@ def main():
# coverage files (which will have distinct suffixes because of parallel=true in .coveragerc
# in this directory; makes them easier to combine and use with coverage report)
os.environ['COVERAGE_FILE'] = os.path.abspath(".") + os.sep + ".coverage"
print("Enabling coverage to", os.environ['COVERAGE_FILE'])
if options.config:
config = {}
six.exec_(open(options.config).read(), config)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment