[PATCH] D70278: [FileCheck] Use lit's internal shell for the test suite

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 14:55:01 PST 2019


jdenny created this revision.
jdenny added reviewers: probinson, thopre, rnk, yln.
Herald added a project: LLVM.
jdenny added a child revision: D65121: [FileCheck] Make FILECHECK_OPTS useful for its test suite.

An advantage is that there are less portability concerns when writing
tests.  For example, `-u` is not supported by all implementations of
`env`, but lit's internal shell provides its own `env` that supports
`-u`.

A disadvantage is that some shell constructs, such as `&&`, are not 
supported, but FileCheck's test suite currently doesn't require such
constructs.

For comparison, lit configures its test suite in the same manner.  See 
`llvm/utils/lit/tests/lit.cfg`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70278

Files:
  llvm/test/FileCheck/lit.local.cfg


Index: llvm/test/FileCheck/lit.local.cfg
===================================================================
--- llvm/test/FileCheck/lit.local.cfg
+++ llvm/test/FileCheck/lit.local.cfg
@@ -1,3 +1,8 @@
+import lit
+
+# Use lit's internal shell to help guarantee test portability.
+config.test_format = lit.formats.ShTest(execute_external=False)
+
 # Unset environment variables that the FileCheck tests
 # expect not to be set.
 file_check_expected_unset_vars = [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70278.229417.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191114/9fac21e5/attachment.bin>


More information about the llvm-commits mailing list