Show More
@@ -65,7 +65,9 b' class IPTestController(object):' | |||
|
65 | 65 | self.cmd.extend(['--with-xunit', '--xunit-file', xunit_file]) |
|
66 | 66 | |
|
67 | 67 | def add_coverage(self, xml=True): |
|
68 |
self.cmd. |
|
|
68 | self.cmd.append('--with-coverage') | |
|
69 | for include in test_sections[self.section].includes: | |
|
70 | self.cmd.extend(['--cover-package', include]) | |
|
69 | 71 | if xml: |
|
70 | 72 | coverage_xml = os.path.abspath(self.section + ".coverage.xml") |
|
71 | 73 | self.cmd.extend(['--cover-xml', '--cover-xml-file', coverage_xml]) |
@@ -117,7 +119,7 b' class IPTestController(object):' | |||
|
117 | 119 | |
|
118 | 120 | __del__ = cleanup |
|
119 | 121 | |
|
120 | def test_controllers_to_run(inc_slow=False): | |
|
122 | def test_controllers_to_run(inc_slow=False, xunit=False, coverage=False): | |
|
121 | 123 | """Returns an ordered list of IPTestController instances to be run.""" |
|
122 | 124 | res = [] |
|
123 | 125 | if not inc_slow: |
@@ -125,7 +127,12 b' def test_controllers_to_run(inc_slow=False):' | |||
|
125 | 127 | |
|
126 | 128 | for name in test_group_names: |
|
127 | 129 | if test_sections[name].will_run: |
|
128 |
|
|
|
130 | controller = IPTestController(name) | |
|
131 | if xunit: | |
|
132 | controller.add_xunit() | |
|
133 | if coverage: | |
|
134 | controller.add_coverage(xml=True) | |
|
135 | res.append(controller) | |
|
129 | 136 | return res |
|
130 | 137 | |
|
131 | 138 | def do_run(controller): |
@@ -193,7 +200,8 b' def run_iptestall(inc_slow=False, jobs=1, xunit=False, coverage=False):' | |||
|
193 | 200 | if jobs != 1: |
|
194 | 201 | IPTestController.buffer_output = True |
|
195 | 202 | |
|
196 |
controllers = test_controllers_to_run(inc_slow=inc_slow |
|
|
203 | controllers = test_controllers_to_run(inc_slow=inc_slow, xunit=xunit, | |
|
204 | coverage=coverage) | |
|
197 | 205 | |
|
198 | 206 | # Run all test runners, tracking execution time |
|
199 | 207 | failed = [] |
General Comments 0
You need to be logged in to leave comments.
Login now