Use `--allow-unused-prefixes=false` by default for FileCheck in MLIR testsuite
authorMehdi Amini <joker.eph@gmail.com>
Fri, 30 Oct 2020 21:25:49 +0000 (21:25 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Fri, 30 Oct 2020 21:46:15 +0000 (21:46 +0000)
This option catches unexpected mismatch when a prefix is given to
FileCheck on the command line but never matches a single line in the
test.

See http://lists.llvm.org/pipermail/llvm-dev/2020-October/146162.html
for more info.

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

mlir/test/lit.cfg.py

index 2a4bf85..e50d4b0 100644 (file)
@@ -84,7 +84,7 @@ llvm_config.add_tool_substitutions(tools, tool_dirs)
 # FileCheck -enable-var-scope is enabled by default in MLIR test
 # This option avoids to accidentally reuse variable across -LABEL match,
 # it can be explicitly opted-in by prefixing the variable name with $
-config.environment['FILECHECK_OPTS'] = "-enable-var-scope"
+config.environment['FILECHECK_OPTS'] = "-enable-var-scope --allow-unused-prefixes=false"
 
 
 # LLVM can be configured with an empty default triple