[Lldb-commits] [lldb] r254890 - Move test summary counts to end; simplify issue detail line

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 6 19:10:02 PST 2015


Author: tfiala
Date: Sun Dec  6 21:10:02 2015
New Revision: 254890

URL: http://llvm.org/viewvc/llvm-project?rev=254890&view=rev
Log:
Move test summary counts to end; simplify issue detail line

Test summary counts now show at the end, with issue details
above.

Issue details now print "ISSUE_TYPE: test method (relative path)".
Relative paths are relative to the
packages/Python/lldbsuite/test directory.

Sample output:

test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --threads 12
Testing: 415 test suites, 12 threads
415 out of 415 test suites processed - TestLldbGdbServer.py
Test Results
Total Test Methods Run (excluding reruns): 2470
Test Method rerun count: 0

Details:
UNEXPECTED SUCCESS: test_symbol_name_dsym (functionalities/completion/TestCompletion.py)
UNEXPECTED SUCCESS: test_symbol_name_dwarf (functionalities/completion/TestCompletion.py)

===================
Test Result Summary
===================
Success:            1329
Expected Failure:     79
Failure:               0
Error:                 0
Unexpected Success:    2
Skip:               1060

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py?rev=254890&r1=254889&r2=254890&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py Sun Dec  6 21:10:02 2015
@@ -9,6 +9,11 @@ normal LLDB test run output when no othe
 """
 from __future__ import print_function
 
+# Python system includes
+import os
+
+# Our imports
+
 from . import test_results
 
 
@@ -200,14 +205,18 @@ class BasicResultsFormatter(test_results
         print_matching_tests = category[2]
         detail_label = category[3]
 
+        test_base_dir = os.path.realpath(os.path.dirname(__file__))
+
         if print_matching_tests:
             # Sort by test name
             for (_, event) in result_events_by_status[result_status_id]:
-                self.out_file.write("{}: {}.{} ({})\n".format(
+                test_relative_path = os.path.relpath(
+                    os.path.realpath(event["test_filename"]),
+                    test_base_dir)
+                self.out_file.write("{}: {} ({})\n".format(
                     detail_label,
-                    event["test_class"],
                     event["test_name"],
-                    event["test_filename"]))
+                    test_relative_path))
 
     def _finish_output_no_lock(self):
         """Writes the test result report to the output file."""
@@ -236,9 +245,6 @@ class BasicResultsFormatter(test_results
         result_events_by_status = self._partition_results_by_status(
             categories)
 
-        # Print the summary
-        self._print_summary_counts(categories, result_events_by_status)
-
         # Print the details
         have_details = self._has_printable_details(
             categories, result_events_by_status)
@@ -248,6 +254,10 @@ class BasicResultsFormatter(test_results
                 self._report_category_details(
                     category, result_events_by_status)
 
+        # Print the summary
+        self._print_summary_counts(categories, result_events_by_status)
+
+
     def _finish_output(self):
         """Prepare and write the results report as all incoming events have
         arrived.




More information about the lldb-commits mailing list