Index: packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -740,6 +740,9 @@ 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) @@ -826,11 +829,14 @@ # 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: @@ -927,6 +933,10 @@ """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'] @@ -996,6 +1006,8 @@ platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] if platform.startswith('freebsd'): platform = 'freebsd' + elif platform.startswith('netbsd'): + platform = 'netbsd' return platform def getHostPlatform(): @@ -1009,6 +1021,8 @@ return 'darwin' elif sys.platform.startswith('freebsd'): return 'freebsd' + elif sys.platform.startswith('netbsd'): + return 'netbsd' else: return sys.platform @@ -1311,7 +1325,7 @@ # 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 @@ -2063,7 +2077,7 @@ """ 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 @@ -2238,6 +2252,8 @@ 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++" @@ -2269,7 +2285,7 @@ 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']