fix(testing): use XMLTestRunner when junit_xml_output is wanted
This commit is contained in:
parent
b80b121f51
commit
fe12722e4b
1 changed files with 4 additions and 1 deletions
|
|
@ -159,11 +159,14 @@ def main(
|
||||||
discover_all_tests(apps, runner)
|
discover_all_tests(apps, runner)
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
global unittest_runner
|
||||||
for app, category, suite in runner.iterRun():
|
for app, category, suite in runner.iterRun():
|
||||||
click.secho(
|
click.secho(
|
||||||
f"\nRunning {suite.countTestCases()} {category} tests for {app}", fg="cyan", bold=True
|
f"\nRunning {suite.countTestCases()} {category} tests for {app}", fg="cyan", bold=True
|
||||||
)
|
)
|
||||||
results.append([app, category, runner.run(suite)])
|
main_runner = unittest_runner if junit_xml_output and unittest_runner else runner
|
||||||
|
res = main_runner.run(suite)
|
||||||
|
results.append([app, category, res])
|
||||||
|
|
||||||
success = all(r.wasSuccessful() for _, _, r in results)
|
success = all(r.wasSuccessful() for _, _, r in results)
|
||||||
if not success:
|
if not success:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue