Skip to content

Revert "[LIT] Print discovered tests and percentages (#66057)" #69715

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

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

madhur13490
Copy link
Contributor

This reverts commit ba8565f.

@llvmbot
Copy link
Member

llvmbot commented Oct 20, 2023

@llvm/pr-subscribers-testing-tools

Author: Madhur Amilkanthwar (madhur13490)

Changes

This reverts commit ba8565f.


Full diff: https://github.com/llvm/llvm-project/pull/69715.diff

2 Files Affected:

  • (modified) llvm/utils/lit/lit/main.py (+3-5)
  • (modified) llvm/utils/lit/tests/discovery.py (-7)
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index db9f24f748d9e16..1d0d6bb2682993d 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -311,7 +311,6 @@ def print_histogram(tests):
 
 def print_results(tests, elapsed, opts):
     tests_by_code = {code: [] for code in lit.Test.ResultCode.all_codes()}
-    total_tests = len(tests)
     for test in tests:
         tests_by_code[test.result.code].append(test)
 
@@ -322,7 +321,7 @@ def print_results(tests, elapsed, opts):
             opts.shown_codes,
         )
 
-    print_summary(total_tests, tests_by_code, opts.quiet, elapsed)
+    print_summary(tests_by_code, opts.quiet, elapsed)
 
 
 def print_group(tests, code, shown_codes):
@@ -337,11 +336,10 @@ def print_group(tests, code, shown_codes):
     sys.stdout.write("\n")
 
 
-def print_summary(total_tests, tests_by_code, quiet, elapsed):
+def print_summary(tests_by_code, quiet, elapsed):
     if not quiet:
         print("\nTesting Time: %.2fs" % elapsed)
 
-    print("\nTotal Discovered Tests: %s" % (total_tests))
     codes = [c for c in lit.Test.ResultCode.all_codes() if not quiet or c.isFailure]
     groups = [(c.label, len(tests_by_code[c])) for c in codes]
     groups = [(label, count) for label, count in groups if count]
@@ -354,4 +352,4 @@ def print_summary(total_tests, tests_by_code, quiet, elapsed):
     for (label, count) in groups:
         label = label.ljust(max_label_len)
         count = str(count).rjust(max_count_len)
-        print("  %s: %s (%.2f%%)" % (label, count, float(count) / total_tests * 100))
+        print("  %s: %s" % (label, count))
diff --git a/llvm/utils/lit/tests/discovery.py b/llvm/utils/lit/tests/discovery.py
old mode 100755
new mode 100644
index 60e7c8d6d688c7f..67f940f9251a01a
--- a/llvm/utils/lit/tests/discovery.py
+++ b/llvm/utils/lit/tests/discovery.py
@@ -28,13 +28,6 @@
 # CHECK-BASIC-OUT: top-level-suite :: test-one
 # CHECK-BASIC-OUT: top-level-suite :: test-two
 
-# RUN: %{lit} %{inputs}/discovery \
-# RUN:   -v > %t.out 2> %t.err
-# RUN: FileCheck --check-prefix=CHECK-PERCENTAGES-OUT < %/t.out %s
-#
-# CHECK-PERCENTAGES-OUT:  Total Discovered Tests: {{[0-9]*}}
-# CHECK-PERCENTAGES-OUT:  Passed: {{[0-9]*}} {{\([0-9]*\.[0-9]*%\)}}
-
 # Check discovery when providing the special builtin 'config_map'
 # RUN: %{python} %{inputs}/config-map-discovery/driver.py \
 # RUN:           %{inputs}/config-map-discovery/main-config/lit.cfg \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants