summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2019-01-10 17:24:06 +0000
committerDan Liew <dan@su-root.co.uk>2019-01-10 17:24:06 +0000
commit4d8c8fe62e8d8b679f91035fa0d2f3051d0f746f (patch)
tree8899ef1e0e0a419670a10acce4ca4b2086bffcdf
parent1b427d4dba7f8ce537452a2cd9bd7835438f6aff (diff)
downloadbcm5719-llvm-4d8c8fe62e8d8b679f91035fa0d2f3051d0f746f.tar.gz
bcm5719-llvm-4d8c8fe62e8d8b679f91035fa0d2f3051d0f746f.zip
[FileCheck] Don't propagate `FILECHECK_DUMP_INPUT_ON_FAILURE` and
`FILECHECK_OPTS` into environment for FileCheck tests. Summary: This fixes the following FileCheck tests: * FileCheck/dump-input-enable.txt * FileCheck/match-full-lines.txt when `FILECHECK_DUMP_INPUT_ON_FAILURE` is set in the environment. By default llvm-lit propagates `FILECHECK_DUMP_INPUT_ON_FAILURE` and `FILECHECK_OPTS` from llvm-lit's environment into the test environment. Unfortunately this can break FileCheck's tests because they expect that these environment variables not to be set. rdar://problem/47176262 Reviewers: jdenny, probinson, george.karpenkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56541 llvm-svn: 350850
-rw-r--r--llvm/test/FileCheck/lit.local.cfg13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/FileCheck/lit.local.cfg b/llvm/test/FileCheck/lit.local.cfg
new file mode 100644
index 00000000000..307da456c38
--- /dev/null
+++ b/llvm/test/FileCheck/lit.local.cfg
@@ -0,0 +1,13 @@
+# Unset environment variables that the FileCheck tests
+# expect not to be set.
+file_check_expected_unset_vars = [
+ 'FILECHECK_DUMP_INPUT_ON_FAILURE',
+ 'FILECHECK_OPTS',
+]
+
+for env_var in file_check_expected_unset_vars:
+ if env_var in config.environment:
+ lit_config.note('Removing {} from environment for FileCheck tests'.format(
+ env_var)
+ )
+ config.environment.pop(env_var)
OpenPOWER on IntegriCloud