From: Dan Liew Date: Thu, 10 Jan 2019 17:24:06 +0000 (+0000) Subject: [FileCheck] Don't propagate `FILECHECK_DUMP_INPUT_ON_FAILURE` and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d89383adbf909b061afbbdcadae21fb598ceb061;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350850 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/FileCheck/lit.local.cfg b/test/FileCheck/lit.local.cfg new file mode 100644 index 00000000000..307da456c38 --- /dev/null +++ b/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)