summaryrefslogtreecommitdiff
path: root/test/farm/html/run_x_xml.py
blob: fe9cefa7d5cb120b83d3c36b0dc25a19ae6d3a78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def html_it():
    """Run coverage and make an XML report for x."""
    import coverage
    cov = coverage.coverage()
    cov.start()
    import x
    cov.stop()
    cov.xml_report(x, outfile="../xml/coverage.xml")

import os
if not os.path.exists("xml"):
    os.makedirs("xml")

runfunc(html_it, rundir="src")

compare("gold_x_xml", "xml", scrubs=[
    (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'),
    (r' version="[-.\w]+"', ' version="VERSION"'),
    ])
clean("xml")