mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't write over JUnit tests results on re-runs
This commit is contained in:
parent
8e2b0c0c28
commit
70b3ccb7ac
1 changed files with 4 additions and 0 deletions
|
@ -879,6 +879,10 @@ def _pytest(session, coverage, cmd_args):
|
|||
except CommandFailed:
|
||||
# Re-run failed tests
|
||||
session.log('Re-running failed tests')
|
||||
|
||||
for idx, parg in enumerate(cmd_args):
|
||||
if parg.startswith('--junitxml='):
|
||||
cmd_args[idx] = parg.replace('.xml', '-rerun-failed.xml')
|
||||
cmd_args.append('--lf')
|
||||
if coverage is True:
|
||||
_run_with_coverage(session, 'coverage', 'run', '-m', 'py.test', *cmd_args)
|
||||
|
|
Loading…
Add table
Reference in a new issue