[Lldb-commits] [PATCH] D11909: Don't print number of failures and percentage if no tests ran.
Chaoren Lin via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 10 09:50:40 PDT 2015
chaoren created this revision.
chaoren added a reviewer: zturner.
chaoren added a subscriber: lldb-commits.
http://reviews.llvm.org/D11909
Files:
test/dosep.py
Index: test/dosep.py
===================================================================
--- test/dosep.py
+++ test/dosep.py
@@ -444,10 +444,16 @@
touch(os.path.join(session_dir, "{}-{}".format(result, test_name)))
print
- print "Ran %d test suites (%d failed) (%f%%)" % (num_test_files, len(failed),
- (100.0 * len(failed) / num_test_files) if num_test_files > 0 else float('NaN'))
- print "Ran %d test cases (%d failed) (%f%%)" % (num_tests, all_fails,
- (100.0 * all_fails / num_tests) if num_tests > 0 else float('NaN'))
+ sys.stdout.write("Ran %d test suites" % num_test_files)
+ if num_test_files > 0:
+ sys.stdout.write(" (%d failed) (%f%%)" % (
+ len(failed), 100.0 * len(failed) / num_test_files))
+ print
+ sys.stdout.write("Ran %d test cases" % num_tests)
+ if num_tests > 0:
+ sys.stdout.write(" (%d failed) (%f%%)" % (
+ all_fails, 100.0 * all_fails / num_tests))
+ print
if len(failed) > 0:
failed.sort()
print "Failing Tests (%d)" % len(failed)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11909.31679.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150810/e68213ae/attachment.bin>
More information about the lldb-commits
mailing list