diff --git a/python/helpers/coverage_runner/run_coverage.py b/python/helpers/coverage_runner/run_coverage.py index 220eeffff5eae128f3b774dc4172d97c0b493966..5d4ce131bd7b78fe575ba99c8538484e1e9cb093 100644 --- a/python/helpers/coverage_runner/run_coverage.py +++ b/python/helpers/coverage_runner/run_coverage.py @@ -46,14 +46,19 @@ sys.argv = argv cwd = os.getcwd() run_xml = os.getenv('PYCHARM_RUN_COVERAGE_XML') +argv = ["xml", "-o", coverage_file + ".xml", "--ignore-errors"] +rcfile = cwd + "/.coveragerc" +if os.path.exists(rcfile): + print("Loading rcfile: %s\n" % rcfile) + argv += ["--rcfile", rcfile] + if run_xml: os.chdir(cwd) - main(["xml", "-o", coverage_file + ".xml", "--ignore-errors"]) + main(argv) else: try: main() finally: if run_cov: os.chdir(cwd) - main(["xml", "-o", coverage_file + ".xml", "--ignore-errors"]) - + main(argv)