Handle extra whitespace in linux distribution name.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier 2014-11-21 08:54:35 +00:00
parent aeff14fc74
commit 1567ac850c

View File

@ -362,10 +362,11 @@ class Configuration(object):
# Insert the distributions name and name-version into the available # Insert the distributions name and name-version into the available
# features to allow tests to XFAIL on them. # features to allow tests to XFAIL on them.
if sys.platform.startswith('linux'): if sys.platform.startswith('linux'):
os_info = platform.linux_distribution() name, ver, _ = platform.linux_distribution()
self.config.available_features.add(os_info[0].lower()) name = name.lower().strip()
self.config.available_features.add( ver = ver.lower().strip()
'%s-%s' % (os_info[0].lower(), os_info[1])) self.config.available_features.add(name)
self.config.available_features.add('%s-%s' % (name, ver))
def configure_compile_flags(self): def configure_compile_flags(self):
# Configure extra compiler flags. # Configure extra compiler flags.