[libcxx] r302607 - Improve how LIT reports the added environment variables

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 17:23:58 PDT 2017


Author: ericwf
Date: Tue May  9 19:23:58 2017
New Revision: 302607

URL: http://llvm.org/viewvc/llvm-project?rev=302607&view=rev
Log:
Improve how LIT reports the added environment variables

Modified:
    libcxx/trunk/utils/libcxx/test/config.py

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=302607&r1=302606&r2=302607&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Tue May  9 19:23:58 2017
@@ -160,7 +160,11 @@ class Configuration(object):
         # Print as list to prevent "set([...])" from being printed.
         self.lit_config.note('Using available_features: %s' %
                              list(self.config.available_features))
-        self.lit_config.note('Using environment: %r' % self.exec_env)
+        show_env_vars = {}
+        for k,v in self.exec_env.items():
+            if k not in os.environ or os.environ[k] != v:
+                show_env_vars[k] = v
+        self.lit_config.note('Adding environment variables: %r' % show_env_vars)
         sys.stderr.flush()  # Force flushing to avoid broken output on Windows
 
     def get_test_format(self):




More information about the cfe-commits mailing list