[llvm] 5ea38b8 - [lit][NFC] Avoid unintended -EMPTY suffix in check prefix (#99690)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 08:21:41 PDT 2024


Author: Paul Kirth
Date: 2024-07-22T08:21:38-07:00
New Revision: 5ea38b86a3011b31f2b2a0de330e32971de4a067

URL: https://github.com/llvm/llvm-project/commit/5ea38b86a3011b31f2b2a0de330e32971de4a067
DIFF: https://github.com/llvm/llvm-project/commit/5ea38b86a3011b31f2b2a0de330e32971de4a067.diff

LOG: [lit][NFC] Avoid unintended -EMPTY suffix in check prefix (#99690)

FileCheck has special handline for the `-EMPTY` suffix, that should
match empty lines. Overloading the suffix can be a source of confusion
when reading tests. Additionally, the current implementation seems to
match the following expressions, which appears to be a bug in FileCheck.

Added: 
    

Modified: 
    llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt b/llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt
index e4997b1250ed3..26150c413dc03 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt
@@ -1,10 +1,10 @@
 # Check that internal env can call internal env.
 
 # RUN: env env %{python} print_environment.py \
-# RUN: | FileCheck -check-prefix=CHECK-2-EMPTY %s
+# RUN: | FileCheck -check-prefix=CHECK-2-EMPTY-ARGS %s
 #
-# CHECK-2-EMPTY: BAR = 2
-# CHECK-2-EMPTY: FOO = 1
+# CHECK-2-EMPTY-ARGS: BAR = 2
+# CHECK-2-EMPTY-ARGS: FOO = 1
 
 # RUN: env FOO=2 env BAR=1 %{python} print_environment.py \
 # RUN: | FileCheck -check-prefix=CHECK-2-VAL %s


        


More information about the llvm-commits mailing list