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

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 09:32:20 PST 2020


mtrofin marked an inline comment as done.
mtrofin added inline comments.


================
Comment at: llvm/test/lit.cfg.py:87
+# expanding FileCheck to the full path.
+config.substitutions.append(('%FileCheckWithUnusedPrefixes%', 
+    'FileCheck --allow-unused-prefixes=true'))
----------------
RKSimon wrote:
> mtrofin wrote:
> > MaskRay wrote:
> > > Does `('FileCheck', 'FileCheck --allow-unused-prefixes=true')` work?
> > > 
> > > You may take a look at some tools like opt,llc,llvm-mc,etc. They expand to the absolute paths. It is possible that FileCheck can use the same trick, but expand with another argument, so that you don't have to update the tests.
> > The intent is to have a way to set --allow-unused-prefixes=false under whole directories, and offer a "way out" for the files where we want to allow it. This way, we can "seal" to the desired behavior whole directories after they are fixed.
> > 
> > This patch does that for llvm/test/Analysis.
> > 
> > We still don't want to blanket-allow the undesirable behavior for entire directories.
> Do we still need this?
Not for this change. It may help with other changes where we want to both introduce the desirable behavior for whole directories, and piecemeal opt out tests. But I can remove it from here and reintroduce it when we hit the problem - wdyt?

(for completeness, as previously discussed, once all tests are clean, we then remove the local.lit.cfg changes, and would replace any %FileCheckWithUnusedPrefixes% with the expanded FileCheck --allow-unused-prefixes)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91275/new/

https://reviews.llvm.org/D91275



More information about the llvm-commits mailing list