OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
noelallen1
2012/09/19 19:47:25
same
| |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ This script will parse the results file produced by MSTest. | 6 """ This script will parse the results file produced by MSTest. |
7 | 7 |
8 The script takes a single argument containing the path to the Results.trx | 8 The script takes a single argument containing the path to the Results.trx |
9 file to parse. It will log relevant test run information, and exit with code 0 | 9 file to parse. It will log relevant test run information, and exit with code 0 |
10 if all tests passed, or code 1 if some test failed. | 10 if all tests passed, or code 1 if some test failed. |
11 """ | 11 """ |
12 | 12 |
(...skipping 27 matching lines...) Expand all Loading... | |
40 if fail_element is not None: | 40 if fail_element is not None: |
41 fail_message = fail_element.text | 41 fail_message = fail_element.text |
42 print 'Test: %s, Duration: %s, Outcome: %s, Reason: %s\n' % ( | 42 print 'Test: %s, Duration: %s, Outcome: %s, Reason: %s\n' % ( |
43 result.attrib['testName'], result.attrib['duration'], | 43 result.attrib['testName'], result.attrib['duration'], |
44 result.attrib['outcome'], fail_message) | 44 result.attrib['outcome'], fail_message) |
45 | 45 |
46 return exit_code | 46 return exit_code |
47 | 47 |
48 if __name__ == '__main__': | 48 if __name__ == '__main__': |
49 sys.exit(main()) | 49 sys.exit(main()) |
OLD | NEW |