From 1bec288c62eca5f608e047c009730a43da7df725 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Jan 2010 20:57:37 -0500 Subject: XML output file is configurable in .rc file. --HG-- rename : test/farm/html/run_a_xml.py => test/farm/html/run_a_xml_1.py --- test/farm/html/run_a_xml.py | 20 -------------------- test/farm/html/run_a_xml_1.py | 20 ++++++++++++++++++++ test/farm/html/run_a_xml_2.py | 20 ++++++++++++++++++++ test/farm/html/src/coverage.xml | 20 ++++++++++++++++++++ test/farm/html/src/run_a_xml_2.ini | 3 +++ 5 files changed, 63 insertions(+), 20 deletions(-) delete mode 100644 test/farm/html/run_a_xml.py create mode 100644 test/farm/html/run_a_xml_1.py create mode 100644 test/farm/html/run_a_xml_2.py create mode 100644 test/farm/html/src/coverage.xml create mode 100644 test/farm/html/src/run_a_xml_2.ini (limited to 'test/farm') diff --git a/test/farm/html/run_a_xml.py b/test/farm/html/run_a_xml.py deleted file mode 100644 index dabfa61f..00000000 --- a/test/farm/html/run_a_xml.py +++ /dev/null @@ -1,20 +0,0 @@ -def html_it(): - """Run coverage and make an XML report for x.""" - import coverage - cov = coverage.coverage() - cov.start() - import a - cov.stop() - cov.xml_report(a, 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") diff --git a/test/farm/html/run_a_xml_1.py b/test/farm/html/run_a_xml_1.py new file mode 100644 index 00000000..7f4805ef --- /dev/null +++ b/test/farm/html/run_a_xml_1.py @@ -0,0 +1,20 @@ +def html_it(): + """Run coverage and make an XML report for a.""" + import coverage + cov = coverage.coverage() + cov.start() + import a + cov.stop() + cov.xml_report(a, outfile="../xml_1/coverage.xml") + +import os +if not os.path.exists("xml_1"): + os.makedirs("xml_1") + +runfunc(html_it, rundir="src") + +compare("gold_x_xml", "xml_1", scrubs=[ + (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), + (r' version="[-.\w]+"', ' version="VERSION"'), + ]) +clean("xml_1") diff --git a/test/farm/html/run_a_xml_2.py b/test/farm/html/run_a_xml_2.py new file mode 100644 index 00000000..b08d7960 --- /dev/null +++ b/test/farm/html/run_a_xml_2.py @@ -0,0 +1,20 @@ +def html_it(): + """Run coverage and make an XML report for a.""" + import coverage + cov = coverage.coverage(config_file="run_a_xml_2.ini") + cov.start() + import a + cov.stop() + cov.xml_report(a) + +import os +if not os.path.exists("xml_2"): + os.makedirs("xml_2") + +runfunc(html_it, rundir="src") + +compare("gold_x_xml", "xml_2", scrubs=[ + (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), + (r' version="[-.\w]+"', ' version="VERSION"'), + ]) +clean("xml_2") diff --git a/test/farm/html/src/coverage.xml b/test/farm/html/src/coverage.xml new file mode 100644 index 00000000..bc517328 --- /dev/null +++ b/test/farm/html/src/coverage.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/farm/html/src/run_a_xml_2.ini b/test/farm/html/src/run_a_xml_2.ini new file mode 100644 index 00000000..8d28f97b --- /dev/null +++ b/test/farm/html/src/run_a_xml_2.ini @@ -0,0 +1,3 @@ +# Put all the XML output in xml_2 +[xml] +output = ../xml_2/coverage.xml -- cgit v1.2.1