[llvm] f62fe0e - [FileCheck] Disallow unused prefixes in llvm/test/Analysis

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 07:57:15 PST 2020


Author: Mircea Trofin
Date: 2020-11-19T07:56:35-08:00
New Revision: f62fe0ee3bff8a9048d6182697ffca71321759bf

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

LOG: [FileCheck] Disallow unused prefixes in llvm/test/Analysis

This is achieved through a substitution of FileCheck in lit.cfg.py,
where we explicitly set -allow-unused-prefixes to false.

We also introduce a %FileCheckWithUnusedPrefixes% substitution that can
be used in those cases where we want to allow unused prefixes, even if
the folder policy is to disallow them.

Differential Revision: https://reviews.llvm.org/D91275

Added: 
    llvm/test/Analysis/lit.local.cfg

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/lit.local.cfg b/llvm/test/Analysis/lit.local.cfg
new file mode 100644
index 000000000000..07c3132153e7
--- /dev/null
+++ b/llvm/test/Analysis/lit.local.cfg
@@ -0,0 +1,9 @@
+# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
+from lit.llvm.subst import ToolSubst
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex, 
+    'FileCheck --allow-unused-prefixes=false'))
+


        


More information about the llvm-commits mailing list