def expectedFailureLinux(bugnumber=None, compilers=None, debug_info=None):
return expectedFailureOS(['linux'], bugnumber, compilers, debug_info=debug_info)
+def expectedFailureNetBSD(bugnumber=None, compilers=None, debug_info=None):
+ return expectedFailureOS(['netbsd'], bugnumber, compilers, debug_info=debug_info)
+
def expectedFailureWindows(bugnumber=None, compilers=None, debug_info=None):
return expectedFailureOS(['windows'], bugnumber, compilers, debug_info=debug_info)
# For legacy reasons, we support both "darwin" and "macosx" as OS X triples.
return expectedFlakeyOS(getDarwinOSTriples(), bugnumber, compilers)
+def expectedFlakeyFreeBSD(bugnumber=None, compilers=None):
+ return expectedFlakeyOS(['freebsd'], bugnumber, compilers)
+
def expectedFlakeyLinux(bugnumber=None, compilers=None):
return expectedFlakeyOS(['linux'], bugnumber, compilers)
-def expectedFlakeyFreeBSD(bugnumber=None, compilers=None):
- return expectedFlakeyOS(['freebsd'], bugnumber, compilers)
+def expectedFlakeyNetBSD(bugnumber=None, compilers=None):
+ return expectedFlakeyOS(['netbsd'], bugnumber, compilers)
def expectedFlakeyCompiler(compiler, compiler_version=None, bugnumber=None):
if compiler_version is None:
"""Decorate the item to skip tests that should be skipped on FreeBSD."""
return skipIfPlatform(["freebsd"])(func)
+def skipIfNetBSD(func):
+ """Decorate the item to skip tests that should be skipped on NetBSD."""
+ return skipIfPlatform(["netbsd"])(func)
+
def getDarwinOSTriples():
return ['darwin', 'macosx', 'ios']
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if platform.startswith('freebsd'):
platform = 'freebsd'
+ elif platform.startswith('netbsd'):
+ platform = 'netbsd'
return platform
def getHostPlatform():
return 'darwin'
elif sys.platform.startswith('freebsd'):
return 'freebsd'
+ elif sys.platform.startswith('netbsd'):
+ return 'netbsd'
else:
return sys.platform
# Set platform context.
if platformIsDarwin():
cls.platformContext = _PlatformContext('DYLD_LIBRARY_PATH', 'lib', 'dylib')
- elif getPlatform() == "linux" or getPlatform() == "freebsd":
+ elif getPlatform() in ("freebsd", "linux", "netbsd"):
cls.platformContext = _PlatformContext('LD_LIBRARY_PATH', 'lib', 'so')
else:
cls.platformContext = None
""" Returns the proper -stdlib flag, or empty if not required."""
if self.platformIsDarwin() or self.getPlatform() == "freebsd":
stdlibflag = "-stdlib=libc++"
- else:
+ else: # this includes NetBSD
stdlibflag = ""
return stdlibflag
cflags += "c++11"
if self.platformIsDarwin() or self.getPlatform() == "freebsd":
cflags += " -stdlib=libc++"
+ elif self.getPlatform() == "netbsd":
+ cflags += " -stdlib=libstdc++"
elif "clang" in self.getCompiler():
cflags += " -stdlib=libstdc++"
return lib_dir
def getLibcPlusPlusLibs(self):
- if self.getPlatform() == 'freebsd' or self.getPlatform() == 'linux':
+ if self.getPlatform() in ('freebsd', 'linux', 'netbsd'):
return ['libc++.so.1']
else:
return ['libc++.1.dylib','libc++abi.dylib']