Hi Jordan, This commit doesn't really make a lot of sense. lit already sanitizes the environment that it passes to subprocesses, it only propagates a small explicit list of environment variables (that happens to include LIBRARY_PATH).
I think we should just drop LIBRARY_PATH from the list of variables we propagate by default into the environment, any objections? - Daniel On Fri, Apr 6, 2012 at 7:59 PM, Jordan Rose <[email protected]> wrote: > Thanks for the fix. This problem originally came up because I have a > custom LIBRARY_PATH setting. If a Windows user has a custom INCLUDE > setting, could it affect any of the Driver tests? > > > On Apr 6, 2012, at 21:05, NAKAMURA Takumi wrote: > > > Jordy, > > > > Don't delete INCLUDE unconditionally. Fixed in r154240. > > See also llvm r152588 and clang r152589. > > > > ...Takumi > > > > > > 2012/4/7 Jordy Rose <[email protected]>: > >> Author: jrose > >> Date: Fri Apr 6 13:14:01 2012 > >> New Revision: 154188 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=154188&view=rev > >> Log: > >> Clear environment variables that might affect Clang before running > tests. > >> > >> Modified: > >> cfe/trunk/test/lit.cfg > >> > >> Modified: cfe/trunk/test/lit.cfg > >> URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=154188&r1=154187&r2=154188&view=diff > >> > ============================================================================== > >> --- cfe/trunk/test/lit.cfg (original) > >> +++ cfe/trunk/test/lit.cfg Fri Apr 6 13:14:01 2012 > >> @@ -46,6 +46,32 @@ > >> config.llvm_src_root = getattr(config, 'llvm_src_root', None) > >> config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) > >> > >> +# Clear some environment variables that might affect Clang. > >> +# > >> +# This first set of vars are read by Clang, but shouldn't affect tests > >> +# that aren't specifically looking for these features, or are required > >> +# simply to run the tests at all. > >> +# > >> +# FIXME: Should we have a tool that enforces this? > >> + > >> +# safe_env_vars = ('TMPDIR', 'TEMP', 'TMP', 'USERPROFILE', 'PWD', > >> +# 'MACOSX_DEPLOYMENT_TARGET', > 'IPHONEOS_DEPLOYMENT_TARGET', > >> +# 'IOS_SIMULATOR_DEPLOYMENT_TARGET', > >> +# 'VCINSTALLDIR', 'VC100COMNTOOLS', 'VC90COMNTOOLS', > >> +# 'VC80COMNTOOLS') > >> +possibly_dangerous_env_vars = ('COMPILER_PATH', 'RC_DEBUG_OPTIONS', > 'INCLUDE', > >> + 'CINDEXTEST_PREAMBLE_FILE', > 'LIBRARY_PATH', > >> + 'CPATH', 'C_INCLUDE_PATH', > 'CPLUS_INCLUDE_PATH', > >> + 'OBJC_INCLUDE_PATH', > 'OBJCPLUS_INCLUDE_PATH', > >> + 'LIBCLANG_TIMING', > 'LIBCLANG_OBJTRACKING', > >> + 'LIBCLANG_LOGGING', > 'LIBCLANG_BGPRIO_INDEX', > >> + 'LIBCLANG_BGPRIO_EDIT', > 'LIBCLANG_NOTHREADS', > >> + 'LIBCLANG_RESOURCE_USAGE', > >> + 'LIBCLANG_CODE_COMPLETION_LOGGING') > >> +for name in possibly_dangerous_env_vars: > >> + if name in config.environment: > >> + del config.environment[name] > >> + > >> # Tweak the PATH to include the tools dir and the scripts dir. > >> if clang_obj_root is not None: > >> llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) > >> > >> > >> _______________________________________________ > >> cfe-commits mailing list > >> [email protected] > >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
