[PATCH] D65156: [lit] Protect full test suite from FILECHECK_OPTS

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 08:15:38 PDT 2019


jdenny added a comment.

In D65156#1608250 <https://reviews.llvm.org/D65156#1608250>, @probinson wrote:

> In D65156#1607252 <https://reviews.llvm.org/D65156#1607252>, @jdenny wrote:
>
> > Thanks.  Is the outermost lit call here running lit's internal shell or an external shell?  (The lit call I mean is the one running lit's test suite and complaining about that command line, which is a lit call within lit's test suite.)
>
>
> How can I determine which one it's using?


This quick hack reveals it.  I'm not aware of an existing option to print this info.

  diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
  index ac627d51c1c1..61e20e75f4a0 100644
  --- a/llvm/utils/lit/lit/TestRunner.py
  +++ b/llvm/utils/lit/lit/TestRunner.py
  @@ -1590,6 +1590,7 @@ def _runShTest(test, litConfig, useExternalSh, script, tmpBase):
       lit.util.mkdir_p(os.path.dirname(tmpBase))
   
       execdir = os.path.dirname(test.getExecPath())
  +    print("HERE: useExternalSh: " + str(useExternalSh))
       if useExternalSh:
           res = executeScript(test, litConfig, tmpBase, script, execdir)
       else:

As an example of how to interpret the output, you might run this (somewhere lit's test suite is currently successful):

  $ FILECHECK_OPTS='-color -dump-input=always -vv' LIT_OPTS='-a --filter=shtest-run-at-line' ninja check-lit |& less -R

For me on ubuntu, this reveals that `useExternalSh` is `False` for the outermost lit call.  For inner lit calls, the FileCheck input dump shows it's `True` for `external-shell/*.txt` tests, and it's `False` for `internal-shell/*.txt` tests.  Look for the keyword `execute_external` in lit config files to see what's setting this.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65156





More information about the llvm-commits mailing list