Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: visual_studio/NativeClientVSAddIn/check_test_results.py

Issue 11366011: [VS Addin] Update unit test result parser to handle inclusive results (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: visual_studio/NativeClientVSAddIn/check_test_results.py
diff --git a/visual_studio/NativeClientVSAddIn/check_test_results.py b/visual_studio/NativeClientVSAddIn/check_test_results.py
index b8e9058b43d4ed70b124c14827f60db0bb310fe1..cdc1503e9d00182147cc3e268800342a447ae5b2 100644
--- a/visual_studio/NativeClientVSAddIn/check_test_results.py
+++ b/visual_studio/NativeClientVSAddIn/check_test_results.py
@@ -32,22 +32,25 @@ def main():
exit_code = 0
# Print the results, note any failures by setting exit_code to 1
- print test_run_name
+ #print test_run_name
binji 2012/10/31 19:15:00 remove commented code
for result in results:
- fail_message = 'None.'
+ fail_message = None
if 'outcome' not in result.attrib:
result.attrib['outcome'] = 'Error'
- if result.attrib['outcome'] != 'Passed':
+ if result.attrib['outcome'] not in ('Passed', 'Inconclusive'):
exit_code = 1
fail_element = result.find('{%s}Output/{%s}ErrorInfo/{%s}Message' % (
MSTEST_NAMESPACE, MSTEST_NAMESPACE, MSTEST_NAMESPACE))
if fail_element is not None:
fail_message = fail_element.text
- print 'Test: %s, Duration: %s, Outcome: %s, Reason: %s\n' % (
- result.attrib['testName'], result.attrib.get('duration'),
- result.attrib['outcome'], fail_message)
+ print 'TEST: %-35s [%s] [%s]' % (result.attrib['testName'],
+ result.attrib.get('outcome'), result.attrib['duration'])
+ if fail_message:
+ print 'Reason: %s' % fail_message
+ elif exit_code:
+ print 'No error message given'
return exit_code
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698