Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name to all XUnit reports #343

Merged
merged 2 commits into from
Oct 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>