[libcxx] r222514 - Handle extra whitespace in linux distribution name.

Eric Fiselier eric at efcs.ca
Fri Nov 21 00:54:35 PST 2014


Author: ericwf
Date: Fri Nov 21 02:54:35 2014
New Revision: 222514

URL: http://llvm.org/viewvc/llvm-project?rev=222514&view=rev
Log:
Handle extra whitespace in linux distribution name.

Modified:
    libcxx/trunk/test/lit.cfg

Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=222514&r1=222513&r2=222514&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Fri Nov 21 02:54:35 2014
@@ -362,10 +362,11 @@ class Configuration(object):
         # Insert the distributions name and name-version into the available
         # features to allow tests to XFAIL on them.
         if sys.platform.startswith('linux'):
-            os_info = platform.linux_distribution()
-            self.config.available_features.add(os_info[0].lower())
-            self.config.available_features.add(
-                '%s-%s' % (os_info[0].lower(), os_info[1]))
+            name, ver, _ = platform.linux_distribution()
+            name = name.lower().strip()
+            ver = ver.lower().strip()
+            self.config.available_features.add(name)
+            self.config.available_features.add('%s-%s' % (name, ver))
 
     def configure_compile_flags(self):
         # Configure extra compiler flags.





More information about the cfe-commits mailing list