Author: steven_wu
Date: Wed Jun 24 14:30:36 2015
New Revision: 240574

URL: http://llvm.org/viewvc/llvm-project?rev=240574&view=rev
Log:
Remove environment variables from driver tests

Summary:
Remove some of dangerous environmental variables from clang/Driver tests.
Driver tests should not rely on preset value of these variables and may
actually fail because of them.
They cannot be removed in test/lit.cfg because we still need to support
relocatable SDKs and other overwrite for other clang tests.

Reviewers: bogner

Subscribers: rnk, cfe-commits

Differential Revision: http://reviews.llvm.org/D7135

Modified:
    cfe/trunk/test/Driver/lit.local.cfg

Modified: cfe/trunk/test/Driver/lit.local.cfg
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lit.local.cfg?rev=240574&r1=240573&r2=240574&view=diff
==============================================================================
--- cfe/trunk/test/Driver/lit.local.cfg (original)
+++ cfe/trunk/test/Driver/lit.local.cfg Wed Jun 24 14:30:36 2015
@@ -4,3 +4,15 @@ config.substitutions = list(config.subst
 config.substitutions.insert(0,
     ('%clang_cc1',
      """*** Do not use 'clang -cc1' in Driver tests. ***""") )
+
+# Remove harmful environmental variables for clang Driver tests.
+# Some might be useful for other tests so they are only removed here.
+driver_overwrite_env_vars = ['MACOSX_DEPLOYMENT_TARGET',
+                             'IPHONEOS_DEPLOYMENT_TARGET',
+                             'SDKROOT', 'CCC_OVERRIDE_OPTIONS',
+                             'CC_PRINT_OPTIONS', 'CC_PRINT_HEADERS',
+                             'CC_LOG_DIAGNOSTICS']
+
+for name in driver_overwrite_env_vars:
+  if name in config.environment:
+    del config.environment[name]


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to