Fix FreeBSD test runs after r233311

On FreeBSD LLDB's triple ends up as e.g. "x86_64-unknown-freebsd10.1"
but getPlatform() consumers expect just the name with no version
number.

llvm-svn: 233705
This commit is contained in:
Ed Maste 2015-03-31 16:37:10 +00:00
parent 2ae9943881
commit bf441f4ffa
1 changed files with 4 additions and 1 deletions
lldb/test

View File

@ -1389,7 +1389,10 @@ class Base(unittest2.TestCase):
def getPlatform(self):
"""Returns the platform the test suite is running on."""
return lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if platform.startswith('freebsd'):
platform = 'freebsd'
return platform
def isIntelCompiler(self):
""" Returns true if using an Intel (ICC) compiler, false otherwise. """