[PATCH] Remove environment variables from driver tests

Steven Wu stevenwu at apple.com
Thu Jan 22 18:44:20 PST 2015


Add more environment variables into the dangerous list for tests
in tests/Driver since some of the driver options can be overwritten
by them.

http://reviews.llvm.org/D7135

Files:
  test/Driver/lit.local.cfg

Index: test/Driver/lit.local.cfg
===================================================================
--- test/Driver/lit.local.cfg
+++ test/Driver/lit.local.cfg
@@ -3,3 +3,13 @@
 config.substitutions.insert(0,
     ('%clang_cc1',
      """*** Do not use 'clang -cc1' in Driver tests. ***""") )
+
+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]

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7135.18649.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150123/3838a22c/attachment.bin>


More information about the cfe-commits mailing list