[llvm] 0b7ae41 - [LIT] Print discovered tests and percentages (#66057) (#69831)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 21 20:52:29 PDT 2023


Author: Madhur Amilkanthwar
Date: 2023-10-22T09:22:25+05:30
New Revision: 0b7ae41b23fc05c2ac3afc8566b8a923d7f76c45

URL: https://github.com/llvm/llvm-project/commit/0b7ae41b23fc05c2ac3afc8566b8a923d7f76c45
DIFF: https://github.com/llvm/llvm-project/commit/0b7ae41b23fc05c2ac3afc8566b8a923d7f76c45.diff

LOG: [LIT] Print discovered tests and percentages (#66057) (#69831)

This patch adds "nice-to-have" feature in lit.
it prints the total number of discovered tests at the beginning. It is
covenient to see the total number of tests and avoid scrolling up to the
beginning of log.

Further, this patch also prints %ge of tests.

This patch fixes tests pointed by previous attempt of landing this
patch.

Reviewed By: RoboTux, jdenny-ornl

Co-authored-by: Madhur A <madhura at nvidia.com>

Added: 
    

Modified: 
    llvm/utils/lit/lit/main.py
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/before-name.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/between-name-equals.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-empty.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-dot.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-equals.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-newline.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-number.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-ws.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/empty.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-equals.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-name.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/ws-only.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/empty.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/end-in-double-backslash.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-bad-redefine.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-continuation.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-redefine.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-run.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-bad-define.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-continuation.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-define.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-run.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-define.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-redefine.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/ws-only.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-config.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-test.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-inside-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-exact.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-once-exact.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-prefixes-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-suffixes-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-inside-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-exact.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-once-exact.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-none.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-prefixes-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-suffixes-pattern.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/location-range.txt
    llvm/utils/lit/tests/Inputs/shtest-define/errors/no-run.txt
    llvm/utils/lit/tests/Inputs/shtest-define/examples/param-subst.txt
    llvm/utils/lit/tests/Inputs/shtest-define/expansion-order.txt
    llvm/utils/lit/tests/Inputs/shtest-define/line-number-substitutions.txt
    llvm/utils/lit/tests/Inputs/shtest-define/name-chars.txt
    llvm/utils/lit/tests/Inputs/shtest-define/recursiveExpansionLimit.txt
    llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-0.txt
    llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-1.txt
    llvm/utils/lit/tests/Inputs/shtest-define/value-equals.txt
    llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt
    llvm/utils/lit/tests/Inputs/shtest-define/ws-and-continuations.txt
    llvm/utils/lit/tests/discovery.py
    llvm/utils/lit/tests/ignore-fail.py
    llvm/utils/lit/tests/shtest-env.py
    llvm/utils/lit/tests/shtest-not.py
    llvm/utils/lit/tests/shtest-pushd-popd.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index 1d0d6bb2682993d..db9f24f748d9e16 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -311,6 +311,7 @@ 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)
 
@@ -321,7 +322,7 @@ def print_results(tests, elapsed, opts):
             opts.shown_codes,
         )
 
-    print_summary(tests_by_code, opts.quiet, elapsed)
+    print_summary(total_tests, tests_by_code, opts.quiet, elapsed)
 
 
 def print_group(tests, code, shown_codes):
@@ -336,10 +337,11 @@ def print_group(tests, code, shown_codes):
     sys.stdout.write("\n")
 
 
-def print_summary(tests_by_code, quiet, elapsed):
+def print_summary(total_tests, 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]
@@ -352,4 +354,4 @@ def print_summary(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" % (label, count))
+        print("  %s: %s (%.2f%%)" % (label, count, float(count) / total_tests * 100))

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/before-name.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/before-name.txt
index 2ef47047907c3f3..12a7652be4f63a0 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/before-name.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/before-name.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution name 'foo %{name}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/between-name-equals.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/between-name-equals.txt
index dae61298be9e24e..ab38ffb51121e77 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/between-name-equals.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/between-name-equals.txt
@@ -6,4 +6,4 @@
 #      CHECK: Substitution name '%{name}:' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-empty.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-empty.txt
index c6c7ececa8bee73..07ea6563e8aafe6 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-empty.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-empty.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution name '%{}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-dot.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-dot.txt
index c0528c695d78e9d..ba89991625e6eb4 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-dot.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-dot.txt
@@ -9,4 +9,4 @@
 #      CHECK: Substitution name '%{foo.bar}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-equals.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-equals.txt
index 1029665015e5028..52743b76fafcc9a 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-equals.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-equals.txt
@@ -6,4 +6,4 @@
 #      CHECK: Substitution name '%{foo' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-newline.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-newline.txt
index 9138beb9ef7df45..71d6e6b21691157 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-newline.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-newline.txt
@@ -5,4 +5,4 @@
 #      CHECK: Substitution name '%{foo bar}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-number.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-number.txt
index 72f96f3ec6c2386..371cb244a5de542 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-number.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-number.txt
@@ -9,4 +9,4 @@
 #      CHECK: Substitution name '%{3}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-ws.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-ws.txt
index a64531b7b556bcd..30b58b3e7413f06 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-ws.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/braces-with-ws.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution name '%{foo bar}' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/empty.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/empty.txt
index 7fec3c49c117fd7..aa9e802f2d9dd10 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/empty.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/empty.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution's definition does not contain '='
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-equals.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-equals.txt
index c57283bcec5f550..81c362cbc3529fd 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-equals.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-equals.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution's definition does not contain '='
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-name.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-name.txt
index a39681f1f5198ef..d11da872f4577eb 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-name.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/no-name.txt
@@ -4,4 +4,4 @@
 #      CHECK: Substitution name '' is malformed {{.*}}
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/ws-only.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/ws-only.txt
index eee0c779468806a..198a79fc2732f30 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/ws-only.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/assignment/ws-only.txt
@@ -5,4 +5,4 @@
 #      CHECK: Substitution's definition does not contain '='
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/empty.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/empty.txt
index 6a85adc04fc6815..79326bfc3f5a62c 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/empty.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/empty.txt
@@ -7,4 +7,4 @@
 #      CHECK: Substitution's continuation is empty
 # CHECK-NEXT: in DEFINE: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/end-in-double-backslash.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/end-in-double-backslash.txt
index acb51cfd1f6199e..1125638011c47ef 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/end-in-double-backslash.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/end-in-double-backslash.txt
@@ -8,4 +8,4 @@
 #      CHECK: Substitution's continuation is empty
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-bad-redefine.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-bad-redefine.txt
index 0083ccbf2e88655..65d3d37fd2c6e83 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-bad-redefine.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-bad-redefine.txt
@@ -10,4 +10,4 @@
 #      CHECK: Substitution's definition does not contain '='
 # CHECK-NEXT: in {{REDEFINE}}: directive on test line [[#@LINE-5]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-continuation.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-continuation.txt
index 40bab49f388a4ab..951266628caa1cf 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-continuation.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-continuation.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{DEFINE}}:' directive (with '\') from line [[#@LINE-3]] to [[#@LINE-2]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-redefine.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-redefine.txt
index 327b72df5b189c1..ea14ba903b4b92c 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-redefine.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-redefine.txt
@@ -10,4 +10,4 @@
 
 # CHECK: Test has unterminated '{{DEFINE}}:' directive (with '\') at line [[#@LINE-5]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-run.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-run.txt
index 65fe09c84688d6d..a31c9a13d29c154 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-run.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define-run.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{DEFINE}}:' directive (with '\') at line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define.txt
index 58a978a386534ee..7de93e8a30affcd 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-define.txt
@@ -5,4 +5,4 @@
 
 # CHECK: Test has unterminated '{{DEFINE}}:' directive (with '\') at line [[#@LINE-2]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-bad-define.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-bad-define.txt
index 5d91231d84d5ff2..bcbe8a01521cd1f 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-bad-define.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-bad-define.txt
@@ -10,4 +10,4 @@
 #      CHECK: Substitution's definition does not contain '='
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-5]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-continuation.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-continuation.txt
index d697d1f5601c472..29b55a1f5e4cbb9 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-continuation.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-continuation.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{REDEFINE}}:' directive (with '\') from line [[#@LINE-3]] to [[#@LINE-2]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-define.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-define.txt
index a259e210b063da0..b5ea18c52a5e1c8 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-define.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-define.txt
@@ -10,4 +10,4 @@
 
 # CHECK: Test has unterminated '{{REDEFINE}}:' directive (with '\') at line [[#@LINE-5]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-run.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-run.txt
index 6385180719a2053..828aa9593eab4d8 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-run.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine-run.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{REDEFINE}}:' directive (with '\') at line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine.txt
index e6f9143a98613af..5cf7731b00bb84a 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-redefine.txt
@@ -5,4 +5,4 @@
 
 # CHECK: Test has unterminated '{{REDEFINE}}:' directive (with '\') at line [[#@LINE-2]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-define.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-define.txt
index 870a707ad2c93bd..a5e95c8162f18f9 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-define.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-define.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{RUN}}:' directive (with '\') at line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-redefine.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-redefine.txt
index 986e1d53b4e4e3d..fe79fa1e39d04a2 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-redefine.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/unterminated-run-redefine.txt
@@ -6,4 +6,4 @@
 
 # CHECK: Test has unterminated '{{RUN}}:' directive (with '\') at line [[#@LINE-4]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/ws-only.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/ws-only.txt
index c4b063055d66a3d..d6e534d06b9dbf1 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/ws-only.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/continuation/ws-only.txt
@@ -8,4 +8,4 @@
 #      CHECK: Substitution's continuation is empty
 # CHECK-NEXT: in {{DEFINE}}: directive on test line [[#@LINE-5]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-config.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-config.txt
index 56c9f6ac855789b..35fdf4f0e0bbcc6 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-config.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-config.txt
@@ -5,4 +5,4 @@
 # CHECK-NEXT: Existing pattern: %{global:greeting}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-test.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-test.txt
index 922201ec45d2ed3..7ece43de90175ff 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-test.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-already-by-test.txt
@@ -7,4 +7,4 @@
 # CHECK-NEXT: Existing pattern: %{foo}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-inside-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-inside-pattern.txt
index 0ed22d5029db29a..17673fdf80ac0d4 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-inside-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-inside-pattern.txt
@@ -5,4 +5,4 @@
 # CHECK-NEXT: Existing pattern: <%{global:inside}>
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-exact.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-exact.txt
index b222bc2f6230ce7..5b01204837be728 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-exact.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-exact.txt
@@ -6,4 +6,4 @@
 # CHECK-NEXT: Existing pattern: %{global:multiple-exact}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-once-exact.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-once-exact.txt
index 2da630e027f4f46..05a53beb893feed 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-once-exact.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-multiple-once-exact.txt
@@ -6,4 +6,4 @@
 # CHECK-NEXT: Existing pattern: %{global:multiple-once-exact}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-prefixes-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-prefixes-pattern.txt
index a0c7402a3942a94..3a936c9133b4a52 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-prefixes-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-prefixes-pattern.txt
@@ -5,4 +5,4 @@
 # CHECK-NEXT: Existing pattern: %{global:prefix}\((.*)\)
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-suffixes-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-suffixes-pattern.txt
index 3189271d3ebb1e1..8cfb8b3d4151c7d 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-suffixes-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/define-suffixes-pattern.txt
@@ -5,4 +5,4 @@
 # CHECK-NEXT: Existing pattern: @%{global:suffix}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-inside-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-inside-pattern.txt
index 7d308a3d52fe7d6..d354d07499d9703 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-inside-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-inside-pattern.txt
@@ -6,4 +6,4 @@
 # CHECK-NEXT: Existing pattern: <%{global:inside}>
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-exact.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-exact.txt
index ee61c8aea2b8f66..e0c87e162b382ff 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-exact.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-exact.txt
@@ -10,4 +10,4 @@
 # CHECK-NEXT: Existing pattern: %{global:multiple-exact}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-once-exact.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-once-exact.txt
index 3fa86a78e810138..7c0052475ba321e 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-once-exact.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-multiple-once-exact.txt
@@ -9,4 +9,4 @@
 # CHECK-NEXT: Existing pattern: %{global:multiple-once-exact}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-none.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-none.txt
index 28ad04c71e9bf0d..20987eb7f9fb179 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-none.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-none.txt
@@ -4,4 +4,4 @@
 #     CHECK: ValueError: No substitution for '%{local}' is defined before '{{REDEFINE}}:' directive at line [[#@LINE-3]]
 # CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-prefixes-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-prefixes-pattern.txt
index cc82a0e0942eadf..a34cae4a3b5cae3 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-prefixes-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-prefixes-pattern.txt
@@ -6,4 +6,4 @@
 # CHECK-NEXT: Existing pattern: %{global:prefix}\((.*)\)
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-suffixes-pattern.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-suffixes-pattern.txt
index edbc124169b9f51..293e8ab28a0234f 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-suffixes-pattern.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/defined-check/redefine-suffixes-pattern.txt
@@ -6,4 +6,4 @@
 # CHECK-NEXT: Existing pattern: @%{global:suffix}
 #  CHECK-NOT: Existing pattern:
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/location-range.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/location-range.txt
index a230298ffd73597..d8186055cb57e83 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/location-range.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/location-range.txt
@@ -5,4 +5,4 @@
 
 # CHECK: ValueError: Substitution whose pattern contains '%{foo}' is already defined before '{{DEFINE}}:' directive from line [[#@LINE-4]] to [[#@LINE-3]]
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/errors/no-run.txt b/llvm/utils/lit/tests/Inputs/shtest-define/errors/no-run.txt
index 842b9c47557bfdd..ff2d10981da381d 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/errors/no-run.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/errors/no-run.txt
@@ -5,4 +5,4 @@
 
 # CHECK: Test has no '{{RUN}}:' line
 
-# CHECK: Unresolved: 1
+# CHECK: Unresolved: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/examples/param-subst.txt b/llvm/utils/lit/tests/Inputs/shtest-define/examples/param-subst.txt
index 1d94c1213723436..91418cd5e88c44a 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/examples/param-subst.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/examples/param-subst.txt
@@ -31,4 +31,4 @@
 ; RUN: %{check}
 ; CHECK:# | %clang_cc1 -verify -fopenmp -fopenmp-version=51 -triple x86_64-unknown-linux-gnu -emit-llvm -o - {{.*}} | FileCheck -check-prefix=NO-SIMD {{.*}}
 
-; CHECK: Passed: 1
+; CHECK: Passed: 1 {{\([0-9]*\.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/expansion-order.txt b/llvm/utils/lit/tests/Inputs/shtest-define/expansion-order.txt
index 23c0a6d5075337e..8d3e961e77cc440 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/expansion-order.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/expansion-order.txt
@@ -38,4 +38,4 @@
 # RUN: %{local:echo}
 # CHECK:# | LOCAL: So Long World World
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/line-number-substitutions.txt b/llvm/utils/lit/tests/Inputs/shtest-define/line-number-substitutions.txt
index 5a1d7f2e1987794..100bbb6c16b9d6e 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/line-number-substitutions.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/line-number-substitutions.txt
@@ -29,4 +29,4 @@
 # RUN: echo '%{lines-rel}'
 # CHECK:# | [[#@LINE+1]], [[#@LINE-3]], [[#@LINE-12]]
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/name-chars.txt b/llvm/utils/lit/tests/Inputs/shtest-define/name-chars.txt
index d27fda2e2fe6e86..cce90e8947c465e 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/name-chars.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/name-chars.txt
@@ -22,4 +22,4 @@
 # RUN: echo '%{_foo_bar_}'
 # CHECK:# | ok at [[#@LINE - 2]]
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/recursiveExpansionLimit.txt b/llvm/utils/lit/tests/Inputs/shtest-define/recursiveExpansionLimit.txt
index e504b822ace81fa..982f7fd43a6aa44 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/recursiveExpansionLimit.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/recursiveExpansionLimit.txt
@@ -9,4 +9,4 @@
 # CHECK-NON-RECUR:# | %{inner}
 # CHECK-RECUR:# | expanded
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-0.txt b/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-0.txt
index dfff9ddd4336fac..034bdd746955a02 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-0.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-0.txt
@@ -19,4 +19,4 @@
 # DEFINE: %{local:echo}=echo LOCAL0: subst
 # RUN: %{local:echo}
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-1.txt b/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-1.txt
index 723165a67100b89..66d1a8033011003 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-1.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/shared-substs-1.txt
@@ -19,4 +19,4 @@
 # DEFINE: %{local:echo}=echo LOCAL1: subst
 # RUN: %{local:echo}
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/value-equals.txt b/llvm/utils/lit/tests/Inputs/shtest-define/value-equals.txt
index c1bdfef30b1a057..88e10d4f64c9583 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/value-equals.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/value-equals.txt
@@ -19,4 +19,4 @@
 # RUN: echo '%{continue-equals}'
 # CHECK:# | FileCheck -input-file=test.txt -implicit-check-not=foobar -check-prefixes=FOO,BAR
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt b/llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt
index 9143796edd32d3a..68cf35825e2a646 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt
@@ -13,4 +13,4 @@
 # RUN: echo '%{escape}'
 # CHECK:# | {{\\?}}\n {{\\?}}\g<param>
 
-# CHECK: Passed: 1
+# CHECK: Passed: 1 {{\([0-9]*.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/Inputs/shtest-define/ws-and-continuations.txt b/llvm/utils/lit/tests/Inputs/shtest-define/ws-and-continuations.txt
index 3e4db1b15d927a0..32075797c422a3c 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-define/ws-and-continuations.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-define/ws-and-continuations.txt
@@ -132,4 +132,4 @@
 # RUN: %{deceptive-continue}
 # CHECK:# | x=3
 
-# CHECK:{{ *}}Passed: 1
+# CHECK:{{ *}}Passed: 1 {{\([0-9]*\.[0-9]*%\)}}

diff  --git a/llvm/utils/lit/tests/discovery.py b/llvm/utils/lit/tests/discovery.py
old mode 100644
new mode 100755
index 67f940f9251a01a..60e7c8d6d688c7f
--- a/llvm/utils/lit/tests/discovery.py
+++ b/llvm/utils/lit/tests/discovery.py
@@ -28,6 +28,13 @@
 # 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 \

diff  --git a/llvm/utils/lit/tests/ignore-fail.py b/llvm/utils/lit/tests/ignore-fail.py
index 0644959828a3c24..494c6e092c90664 100644
--- a/llvm/utils/lit/tests/ignore-fail.py
+++ b/llvm/utils/lit/tests/ignore-fail.py
@@ -12,8 +12,9 @@
 # CHECK-DAG: XPASS: ignore-fail :: xpass.txt
 
 #      CHECK: Testing Time:
-# CHECK-NEXT:   Expectedly Failed : 1
-# CHECK-NEXT:   Unresolved : 1
-# CHECK-NEXT:   Failed : 1
-# CHECK-NEXT:   Unexpectedly Passed: 1
+# CHECK: Total Discovered Tests:
+# CHECK-NEXT:   Expectedly Failed : 1 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK-NEXT:   Unresolved : 1 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK-NEXT:   Failed : 1 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK-NEXT:   Unexpectedly Passed: 1 {{\([0-9]*\.[0-9]*%\)}}
 #  CHECK-NOT: {{.}}

diff  --git a/llvm/utils/lit/tests/shtest-env.py b/llvm/utils/lit/tests/shtest-env.py
index c093b62e5420f92..03bb4a3cae7dd19 100644
--- a/llvm/utils/lit/tests/shtest-env.py
+++ b/llvm/utils/lit/tests/shtest-env.py
@@ -120,6 +120,7 @@
 # CHECK-NOT: {{^[^#]}}
 # CHECK: --
 
-# CHECK: Passed:  4
-# CHECK: Failed: 12
+# CHECK: Total Discovered Tests: 16
+# CHECK: Passed:  4 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK: Failed: 12 {{\([0-9]*\.[0-9]*%\)}}
 # CHECK-NOT: {{.}}

diff  --git a/llvm/utils/lit/tests/shtest-not.py b/llvm/utils/lit/tests/shtest-not.py
index f514cddf1deffa4..b42769ffd938301 100644
--- a/llvm/utils/lit/tests/shtest-not.py
+++ b/llvm/utils/lit/tests/shtest-not.py
@@ -184,6 +184,7 @@
 # CHECK: # | Error: 'not --crash' cannot call 'rm'
 # CHECK: # error: command failed with exit status: {{.*}}
 
-# CHECK: Passed:  1
-# CHECK: Failed: 16
+# CHECK: Total Discovered Tests: 17
+# CHECK: Passed:  1 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK: Failed: 16 {{\([0-9]*\.[0-9]*%\)}}
 # CHECK-NOT: {{.}}

diff  --git a/llvm/utils/lit/tests/shtest-pushd-popd.py b/llvm/utils/lit/tests/shtest-pushd-popd.py
index 6d7e93c74a05002..f917c1a4a45998f 100644
--- a/llvm/utils/lit/tests/shtest-pushd-popd.py
+++ b/llvm/utils/lit/tests/shtest-pushd-popd.py
@@ -19,6 +19,7 @@
 # CHECK: pushd a b
 # CHECK: # | 'pushd' supports only one argument
 
-# CHECK: Passed:  1
-# CHECK: Failed:  3
+# CHECK: Total Discovered Tests: 4
+# CHECK: Passed:  1 {{\([0-9]*\.[0-9]*%\)}}
+# CHECK: Failed:  3 {{\([0-9]*\.[0-9]*%\)}}
 # CHECK-NOT: {{.}}


        


More information about the llvm-commits mailing list