Skip to content

Commit

Permalink
Merge pull request #343 from galaxyproject/fix-xunit-reports
Browse files Browse the repository at this point in the history
Add name to all XUnit reports
  • Loading branch information
martenson committed Oct 22, 2015
2 parents ee36700 + 4116a83 commit 32e5f00
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions planemo/commands/cmd_shed_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def diff(realized_repository):
'errorMessage': 'Error diffing repositories',
'errorContent': escape(diff_output_contents),
'time': (time2 - time1),
'name': 'shed-diff',
})
elif result > 2:
collected_data['results']['failures'] += 1
Expand All @@ -134,6 +135,7 @@ def diff(realized_repository):
'errorMessage': 'Planemo error diffing repositories',
'errorContent': escape(diff_output_contents),
'time': (time2 - time1),
'name': 'shed-diff',
})
elif result == 2:
collected_data['results']['failures'] += 1
Expand All @@ -143,6 +145,7 @@ def diff(realized_repository):
'errorMessage': 'Target Repository does not exist',
'errorContent': escape(diff_output_contents),
'time': (time2 - time1),
'name': 'shed-diff',
})
elif result == 1:
collected_data['results']['failures'] += 1
Expand All @@ -152,11 +155,13 @@ def diff(realized_repository):
'errorMessage': 'Repository is different',
'errorContent': escape(diff_output_contents),
'time': (time2 - time1),
'name': 'shed-diff',
})
else:
collected_data['tests'].append({
'classname': realized_repository.name,
'time': (time2 - time1),
'name': 'shed-diff',
})
return result

Expand Down
4 changes: 4 additions & 0 deletions planemo/commands/cmd_shed_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def update(realized_repository):
'errorType': 'FailedUpdate',
'errorMessage': 'Failed to update repository as it does not exist in target ToolShed',
'time': (time2 - time1),
'name': 'shed-update',
})
error("Failed to update repository it does not exist "
"in target ToolShed.")
Expand All @@ -111,6 +112,7 @@ def update(realized_repository):
collected_data['tests'].append({
'classname': realized_repository.name,
'time': (time2 - time1),
'name': 'shed-update',
})
return 0
elif upload_ok:
Expand All @@ -120,6 +122,7 @@ def update(realized_repository):
'errorType': 'FailedMetadata',
'errorMessage': 'Failed to update repository metadata',
'time': (time2 - time1),
'name': 'shed-update',
})
error("Repo updated but metadata was not.")
return 1
Expand All @@ -130,6 +133,7 @@ def update(realized_repository):
'errorType': 'FailedUpdate',
'errorMessage': 'Failed to update repository',
'time': (time2 - time1),
'name': 'shed-update',
})
error("Failed to update a repository.")
return 1
Expand Down
4 changes: 2 additions & 2 deletions tests/data/repos/multi_repos_nested.xunit-bad.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
errors="0"
failures="1"
skip="0">
<testcase classname="cat1" name="" time="">
<testcase classname="cat1" name="shed-diff" time="">
<error type="planemo.Different" message="Repository is different">
Only in _local_: related_file

</error>
</testcase>
<testcase classname="cat2" name="" time="">
<testcase classname="cat2" name="shed-diff" time="">
</testcase>
</testsuite>
4 changes: 2 additions & 2 deletions tests/data/repos/multi_repos_nested.xunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
errors="0"
failures="0"
skip="0">
<testcase classname="cat1" name="" time=""/>
<testcase classname="cat2" name="" time=""/>
<testcase classname="cat1" name="shed-diff" time=""/>
<testcase classname="cat2" name="shed-diff" time=""/>
</testsuite>

0 comments on commit 32e5f00

Please sign in to comment.