105 changes: 48 additions & 57 deletions lldb/test/lldbtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def expectedFailurex86_64(bugnumber=None):

def expectedFailureOS(oslist, bugnumber=None, compilers=None):
def fn(self):
return (lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] in oslist and
return (self.getPlatform() in oslist and
self.expectedCompiler(compilers))
return expectedFailure(fn, bugnumber)

Expand Down Expand Up @@ -641,36 +641,6 @@ def wrapper(*args, **kwargs):
func(*args, **kwargs)
return wrapper

def skipIfFreeBSD(func):
"""Decorate the item to skip tests that should be skipped on FreeBSD."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
raise Exception("@skipIfFreeBSD can only be used to decorate a test method")
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if "freebsd" in platform:
self.skipTest("skip on FreeBSD")
else:
func(*args, **kwargs)
return wrapper

def skipIfLinux(func):
"""Decorate the item to skip tests that should be skipped on Linux."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
raise Exception("@skipIfLinux can only be used to decorate a test method")
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if "linux" in platform:
self.skipTest("skip on linux")
else:
func(*args, **kwargs)
return wrapper

def skipIfNoSBHeaders(func):
"""Decorate the item to mark tests that should be skipped when LLDB is built with no SB API headers."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
Expand All @@ -690,36 +660,53 @@ def wrapper(*args, **kwargs):
func(*args, **kwargs)
return wrapper

def skipIfWindows(func):
"""Decorate the item to skip tests that should be skipped on Windows."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
raise Exception("@skipIfWindows can only be used to decorate a test method")
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if "windows" in platform:
self.skipTest("skip on Windows")
else:
func(*args, **kwargs)
return wrapper
def skipIfFreeBSD(func):
"""Decorate the item to skip tests that should be skipped on FreeBSD."""
return skipIfPlatform(["freebsd"])(func)

def skipIfDarwin(func):
"""Decorate the item to skip tests that should be skipped on Darwin."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
raise Exception("@skipIfDarwin can only be used to decorate a test method")
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
if "darwin" in platform or "macosx" in platform:
self.skipTest("skip on darwin")
else:
func(*args, **kwargs)
return wrapper
return skipIfPlatform(["darwin", "macosx"])(func)

def skipIfLinux(func):
"""Decorate the item to skip tests that should be skipped on Linux."""
return skipIfPlatform(["linux"])(func)

def skipIfWindows(func):
"""Decorate the item to skip tests that should be skipped on Windows."""
return skipIfPlatform(["windows"])(func)

def skipUnlessDarwin(func):
"""Decorate the item to skip tests that should be skipped on any non Darwin platform."""
return skipUnlessPlatform(["darwin", "macosx"])(func)

def skipIfPlatform(oslist):
"""Decorate the item to skip tests if running on one of the listed platforms."""
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
if self.getPlatform() in oslist:
self.skipTest("skip on %s" % (", ".join(oslist)))
else:
func(*args, **kwargs)
return wrapper
return decorator

def skipUnlessPlatform(oslist):
"""Decorate the item to skip tests unless running on one of the listed platforms."""
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
if not (self.getPlatform() in oslist):
self.skipTest("requires one of %s" % (", ".join(oslist)))
else:
func(*args, **kwargs)
return wrapper
return decorator

def skipIfLinuxClang(func):
"""Decorate the item to skip tests that should be skipped if building on
Expand Down Expand Up @@ -1400,6 +1387,10 @@ def getCompilerVersion(self):
version = m.group(1)
return version

def getPlatform(self):
"""Returns the platform the test suite is running on."""
return lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]

def isIntelCompiler(self):
""" Returns true if using an Intel (ICC) compiler, false otherwise. """
return any([x in self.getCompiler() for x in ["icc", "icpc", "icl"]])
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/logging/TestLogging.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def classCleanup(cls):
cls.RemoveTempFile(cls.truncate_log_file)
cls.RemoveTempFile(cls.append_log_file)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_with_dsym (self):
self.buildDsym ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from lldbtest import *

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
class AddDsymMidExecutionCommandCase(TestBase):

mydir = TestBase.compute_mydir(__file__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppleTypesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)

#rdar://problem/11166975
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_debug_info_for_apple_types(self):
"""Test that __apple_types section does get produced by clang."""

Expand All @@ -23,7 +23,7 @@ def test_debug_info_for_apple_types(self):
self.buildDefault()
self.apple_types(dot_o=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_debug_info_for_apple_types_dsym(self):
"""Test that __apple_types section does get produced by dsymutil.
This is supposed to succeed even with rdar://problem/11166975."""
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class TestIndirectFunctions(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_python_api(self):
"""Test stepping and setting breakpoints in indirect and re-exported symbols."""
self.buildDsym()
self.indirect_stepping()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/macosx/order/TestOrderFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class OrderFileTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_with_dsym(self):
"""Test debug symbols follow the correct order by the order file."""
self.buildDsym()
self.order_file()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dwarf_test
def test_with_dwarf(self):
"""Test debug symbols follow the correct order by the order file."""
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/macosx/queues/TestQueues.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TestQueues(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_python_api(self):
Expand All @@ -19,7 +19,7 @@ def test_with_dsym_and_python_api(self):
self.queues()
self.queues_with_libBacktraceRecording()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class TestSafeFuncCalls(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_python_api(self):
"""Test function call thread safety."""
self.buildDsym()
self.function_call_safety_check()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
Expand Down
8 changes: 4 additions & 4 deletions lldb/test/macosx/universal/TestUniversal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def setUp(self):
self.line = line_number('main.c', '// Set break point at this line.')

@python_api_test
@unittest2.skipUnless(sys.platform.startswith("darwin") and os.uname()[4] in ['i386', 'x86_64'],
"requires Darwin & i386")
@skipUnlessDarwin
@unittest2.skipUnless(os.uname()[4] in ['i386', 'x86_64'], "requires i386 or x86_64")
def test_sbdebugger_create_target_with_file_and_target_triple(self):
"""Test the SBDebugger.CreateTargetWithFileAndTargetTriple() API."""
# Invoke the default build rule.
Expand All @@ -35,8 +35,8 @@ def test_sbdebugger_create_target_with_file_and_target_triple(self):
process = target.LaunchSimple (None, None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)

@unittest2.skipUnless(sys.platform.startswith("darwin") and os.uname()[4] in ['i386', 'x86_64'],
"requires Darwin & i386")
@skipUnlessDarwin
@unittest2.skipUnless(os.uname()[4] in ['i386', 'x86_64'], "requires i386 or x86_64")
def test_process_launch_for_universal(self):
"""Test process launch of a universal binary."""
from lldbutil import print_registers
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/breakpoint/TestBreakpointAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BreakpointAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_breakpoint_is_valid_with_dsym(self):
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/python_api/class_members/TestSBTypeClassMembers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SBTypeMemberFunctionsTest(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand All @@ -22,7 +22,7 @@ def test_with_dsym(self):
self.setTearDownCleanup(dictionary=d)
self.type_api(self.exe_name)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dwarf_test
def test_with_dwarf(self):
Expand Down
10 changes: 4 additions & 6 deletions lldb/test/python_api/event/TestEvents.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@ class EventAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_listen_for_and_print_event_with_dsym(self):
"""Exercise SBEvent API."""
self.buildDsym()
self.do_listen_for_and_print_event()

@unittest2.skipUnless((sys.platform.startswith("darwin") or
sys.platform.startswith("freebsd")),
"requires Darwin or FreeBSD")
@skipUnlessPlatform(["darwin", "macosx", "freebsd"])
@python_api_test
@dwarf_test
def test_listen_for_and_print_event_with_dwarf(self):
"""Exercise SBEvent API."""
self.buildDwarf()
self.do_listen_for_and_print_event()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_wait_for_event_with_dsym(self):
Expand All @@ -46,7 +44,7 @@ def test_wait_for_event_with_dwarf(self):
self.buildDwarf()
self.do_wait_for_event()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_add_listener_to_broadcaster_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SBFrameFindValueTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_formatters_api(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/formatters/TestFormattersSBAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SBFormattersAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_formatters_api(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/frame/TestFrames.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FrameAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_arg_vals_for_call_stack_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/frame/inlines/TestInlinedFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InlinedFrameAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stop_at_outer_inline_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/function_symbol/TestDisasmAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DisasmAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/function_symbol/TestSymbolAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SymbolAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
6 changes: 3 additions & 3 deletions lldb/test/python_api/hello_world/TestHelloWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HelloWorldTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_process_launch_api(self):
Expand All @@ -34,7 +34,7 @@ def test_with_dwarf_and_process_launch_api(self):
self.hello_world_python()

@not_remote_testsuite_ready
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_attach_to_process_with_id_api(self):
Expand All @@ -59,7 +59,7 @@ def test_with_dwarf_and_attach_to_process_with_id_api(self):
self.hello_world_attach_with_id_api()

@not_remote_testsuite_ready
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_attach_to_process_with_name_api(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CommandInterpreterAPICase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_process_launch_api(self):
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/python_api/objc_type/TestObjCType.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class ObjCSBTypeTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
"""Test SBType for ObjC classes."""
self.buildDsym()
self.objc_sbtype_test()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dwarf_test
def test_with_dwarf(self):
Expand Down
6 changes: 3 additions & 3 deletions lldb/test/python_api/process/TestProcessAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ProcessAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_read_memory_with_dsym(self):
Expand All @@ -27,7 +27,7 @@ def test_read_memory_with_dwarf(self):
self.buildDwarf()
self.read_memory()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_write_memory_with_dsym(self):
Expand All @@ -42,7 +42,7 @@ def test_write_memory_with_dwarf(self):
self.buildDwarf()
self.write_memory()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_access_my_int_with_dsym(self):
Expand Down
20 changes: 10 additions & 10 deletions lldb/test/python_api/process/io/TestProcessIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,79 +10,79 @@ class ProcessIOTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "dsym requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stdin_by_api_with_dsym(self):
"""Exercise SBProcess.PutSTDIN()."""
self.buildDsym()
self.do_stdin_by_api()

@unittest2.skipIf(sys.platform.startswith("win32"), "stdio manipulation unsupported on Windows")
@skipIfWindows # stdio manipulation unsupported on Windows
@python_api_test
@dwarf_test
def test_stdin_by_api_with_dwarf(self):
"""Exercise SBProcess.PutSTDIN()."""
self.buildDwarf()
self.do_stdin_by_api()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "dsym requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stdin_redirection_with_dsym(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
self.buildDsym()
self.do_stdin_redirection()

@unittest2.skipIf(sys.platform.startswith("win32"), "stdio manipulation unsupported on Windows")
@skipIfWindows # stdio manipulation unsupported on Windows
@python_api_test
@dwarf_test
def test_stdin_redirection_with_dwarf(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
self.buildDwarf()
self.do_stdin_redirection()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "dsym requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stdout_redirection_with_dsym(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
self.buildDsym()
self.do_stdout_redirection()

@unittest2.skipIf(sys.platform.startswith("win32"), "stdio manipulation unsupported on Windows")
@skipIfWindows # stdio manipulation unsupported on Windows
@python_api_test
@dwarf_test
def test_stdout_redirection_with_dwarf(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
self.buildDwarf()
self.do_stdout_redirection()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "dsym requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stderr_redirection_with_dsym(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
self.buildDsym()
self.do_stderr_redirection()

@unittest2.skipIf(sys.platform.startswith("win32"), "stdio manipulation unsupported on Windows")
@skipIfWindows # stdio manipulation unsupported on Windows
@python_api_test
@dwarf_test
def test_stderr_redirection_with_dwarf(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
self.buildDwarf()
self.do_stderr_redirection()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "dsym requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_stdout_stderr_redirection_with_dsym(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
self.buildDsym()
self.do_stdout_stderr_redirection()

@unittest2.skipIf(sys.platform.startswith("win32"), "stdio manipulation unsupported on Windows")
@skipIfWindows # stdio manipulation unsupported on Windows
@python_api_test
@dwarf_test
def test_stdout_stderr_redirection_with_dwarf(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Radar12481949DataFormatterTestCase(TestBase):
# test for rdar://problem/12481949
mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_with_dsym_and_run_command(self):
"""Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1."""
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/sbdata/TestSBData.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SBDataAPICase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_run_command(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SBValuePersistTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/section/TestSectionAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SectionAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_target_byte_size_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/symbol-context/TestSymbolContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SymbolContextAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
20 changes: 10 additions & 10 deletions lldb/test/python_api/target/TestTargetAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TargetAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_find_global_variables_with_dsym(self):
Expand All @@ -38,7 +38,7 @@ def test_find_global_variables_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.find_global_variables('b.out')

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_find_functions_with_dsym(self):
Expand All @@ -57,7 +57,7 @@ def test_find_functions_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.find_functions('b.out')

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_description_with_dsym(self):
Expand All @@ -72,7 +72,7 @@ def test_get_description_with_dwarf(self):
self.buildDwarf()
self.get_description()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
@expectedFailureDarwin("llvm.org/pr20273")
Expand All @@ -89,7 +89,7 @@ def test_launch_new_process_and_redirect_stdout_with_dwarf(self):
self.buildDwarf()
self.launch_new_process_and_redirect_stdout()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_resolve_symbol_context_with_address_with_dsym(self):
Expand All @@ -104,7 +104,7 @@ def test_resolve_symbol_context_with_address_with_dwarf(self):
self.buildDwarf()
self.resolve_symbol_context_with_address()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_platform_with_dsym(self):
Expand All @@ -125,7 +125,7 @@ def test_get_platform_with_dwarf(self):
platform = target.platform
self.assertTrue(platform, VALID_PLATFORM)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_data_byte_size_with_dsym(self):
Expand All @@ -144,7 +144,7 @@ def test_get_data_byte_size_with_dwarf(self):
target = self.create_simple_target('b.out')
self.assertEquals(target.data_byte_size, 1)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_code_byte_size_with_dsym(self):
Expand All @@ -163,7 +163,7 @@ def test_get_code_byte_size_with_dwarf(self):
target = self.create_simple_target('b.out')
self.assertEquals(target.code_byte_size, 1)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_resolve_file_address_with_dsym(self):
Expand All @@ -182,7 +182,7 @@ def test_resolve_file_address_with_dwarf(self):
target = self.create_simple_target('b.out')
self.resolve_file_address(target)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_read_memory_with_dsym(self):
Expand Down
10 changes: 5 additions & 5 deletions lldb/test/python_api/thread/TestThreadAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ThreadAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_process_with_dsym(self):
Expand All @@ -27,7 +27,7 @@ def test_get_process_with_dwarf(self):
self.buildDwarf()
self.get_process()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_get_stop_description_with_dsym(self):
Expand All @@ -42,7 +42,7 @@ def test_get_stop_description_with_dwarf(self):
self.buildDwarf()
self.get_stop_description()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_run_to_address_with_dsym(self):
Expand All @@ -63,7 +63,7 @@ def test_run_to_address_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.run_to_address(self.exe_name)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_step_out_of_malloc_into_function_b_with_dsym(self):
Expand All @@ -86,7 +86,7 @@ def test_step_out_of_malloc_into_function_b_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.step_out_of_malloc_into_function_b(self.exe_name)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_step_over_3_times_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/type/TestTypeList.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TypeAndTypeListTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/value/TestValueAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ValueAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ChangeValueAPITestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_change_value_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ValueAsLinkedListTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HelloWorldTestCase(TestBase):

mydir = TestBase.compute_mydir(__file__)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_process_launch_api(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/watchpoint/TestSetWatchpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUp(self):
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_watch_val_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUp(self):
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_set_watch_ignore_count_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/python_api/watchpoint/TestWatchpointIter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUp(self):
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_watch_iter_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setUp(self):
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_watchpoint_cond_api_with_dsym(self):
"""Test watchpoint condition API."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUp(self):
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_watch_location_with_dsym(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUp(self):
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_watch_address_with_dsym(self):
Expand All @@ -38,7 +38,7 @@ def test_watch_address_with_dwarf(self):
self.buildDwarf()
self.do_set_watchaddress()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_watch_address_with_invalid_watch_size_with_dsym(self):
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/settings/TestSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_disassembler_settings(self):
self.expect("disassemble -n numberfn",
substrs = ["5ah"])

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_run_args_and_env_vars_with_dsym(self):
"""Test that run-args and env-vars are passed to the launched process."""
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/tools/lldb-mi/signal/TestMiSignal.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_lldbmi_stopped_when_stopatentry_local(self):

@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_lldbmi_stopped_when_stopatentry_remote(self):
"""Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (remote)."""

Expand Down Expand Up @@ -156,7 +156,7 @@ def test_lldbmi_stopped_when_segfault_local(self):

@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_lldbmi_stopped_when_segfault_remote(self):
"""Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (remote)."""

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/tools/lldb-mi/stack/TestMiStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_lldbmi_stack_info_depth(self):
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_lldbmi_stack_info_frame(self):
"""Test that 'lldb-mi --interpreter' can show information about current frame."""

Expand Down
8 changes: 4 additions & 4 deletions lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ def qProcessInfo_does_not_contain_keys(self, absent_key_set):

self.assertEquals(unexpected_key_set, set(), "the listed keys were present but unexpected in qProcessInfo result")

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@debugserver_test
@dsym_test
def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self):
self.init_debugserver_test()
self.buildDsym()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))

@unittest2.skipUnless(sys.platform.startswith("linux"), "requires Linux")
@skipUnlessPlatform(["linux"])
@llgs_test
@dwarf_test
def test_qProcessInfo_contains_triple_llgs_linux(self):
self.init_llgs_test()
self.buildDwarf()
self.qProcessInfo_contains_keys(set(['triple']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@debugserver_test
@dsym_test
def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
Expand All @@ -175,7 +175,7 @@ def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
# for the remote Host and Process.
self.qProcessInfo_does_not_contain_keys(set(['triple']))

@unittest2.skipUnless(sys.platform.startswith("linux"), "requires Linux")
@skipUnlessPlatform(["linux"])
@llgs_test
@dwarf_test
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_qThreadStopInfo_has_valid_thread_names_debugserver_dsym(self):
self.set_inferior_startup_launch()
self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")

@unittest2.skipUnless(sys.platform.startswith("linux"), "test requires OS with set, equal thread names by default")
@skipUnlessPlatform(["linux"]) # test requires OS with set, equal thread names by default.
@llgs_test
@dwarf_test
def test_qThreadStopInfo_has_valid_thread_names_llgs_dwarf(self):
Expand Down
10 changes: 5 additions & 5 deletions lldb/test/types/HideTestFailures.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def tearDown(self):
# Call super's tearDown().
TestBase.tearDown(self)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_char_type_with_dsym(self):
"""Test that char-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
Expand All @@ -54,7 +54,7 @@ def test_char_type_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.char_type()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_short_type_with_dsym(self):
"""Test that short-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'short.cpp'}
Expand All @@ -69,7 +69,7 @@ def test_short_type_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.short_type()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_int_type_with_dsym(self):
"""Test that int-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'int.cpp'}
Expand All @@ -84,7 +84,7 @@ def test_int_type_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.int_type()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_long_type_with_dsym(self):
"""Test that long-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long.cpp'}
Expand All @@ -100,7 +100,7 @@ def test_long_type_with_dwarf(self):
self.setTearDownCleanup(dictionary=d)
self.long_type()

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
def test_long_long_type_with_dsym(self):
"""Test that 'long long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long_long.cpp'}
Expand Down
10 changes: 5 additions & 5 deletions lldb/test/types/TestFloatTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest2
import lldb
import sys
from lldbtest import dsym_test, dwarf_test
from lldbtest import *

class FloatTypesTestCase(AbstractBase.GenericTester):

Expand All @@ -19,13 +19,13 @@ def setUp(self):
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_float_type_with_dsym(self):
"""Test that float-type variables are displayed correctly."""
self.build_and_run('float.cpp', set(['float']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_float_type_from_block_with_dsym(self):
"""Test that float-type variables are displayed correctly from a block."""
Expand All @@ -36,13 +36,13 @@ def test_float_type_with_dwarf(self):
"""Test that float-type variables are displayed correctly."""
self.build_and_run('float.cpp', set(['float']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_double_type_with_dsym(self):
"""Test that double-type variables are displayed correctly."""
self.build_and_run('double.cpp', set(['double']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_double_type_from_block_with_dsym(self):
"""Test that double-type variables are displayed correctly from a block."""
Expand Down
10 changes: 5 additions & 5 deletions lldb/test/types/TestFloatTypesExpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest2
import lldb
import sys
from lldbtest import dsym_test, dwarf_test
from lldbtest import *

class FloatTypesExprTestCase(AbstractBase.GenericTester):

Expand All @@ -22,13 +22,13 @@ def setUp(self):
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_float_type_with_dsym(self):
"""Test that float-type variable expressions are evaluated correctly."""
self.build_and_run_expr('float.cpp', set(['float']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_float_type_from_block_with_dsym(self):
"""Test that float-type variables are displayed correctly from a block."""
Expand All @@ -39,13 +39,13 @@ def test_float_type_with_dwarf(self):
"""Test that float-type variable expressions are evaluated correctly."""
self.build_and_run_expr('float.cpp', set(['float']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_double_type_with_dsym(self):
"""Test that double-type variable expressions are evaluated correctly."""
self.build_and_run_expr('double.cpp', set(['double']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_double_type_from_block_with_dsym(self):
"""Test that double-type variables are displayed correctly from a block."""
Expand Down
42 changes: 21 additions & 21 deletions lldb/test/types/TestIntegerTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest2
import lldb
import sys
from lldbtest import dsym_test, dwarf_test
from lldbtest import *

class IntegerTypesTestCase(AbstractBase.GenericTester):

Expand All @@ -19,13 +19,13 @@ def setUp(self):
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_char_type_with_dsym(self):
"""Test that char-type variables are displayed correctly."""
self.build_and_run('char.cpp', set(['char']), qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_char_type_from_block_with_dsym(self):
"""Test that char-type variables are displayed correctly from a block."""
Expand All @@ -36,13 +36,13 @@ def test_char_type_with_dwarf(self):
"""Test that char-type variables are displayed correctly."""
self.build_and_run('char.cpp', set(['char']), dsym=False, qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_char_type_with_dsym(self):
"""Test that 'unsigned_char'-type variables are displayed correctly."""
self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_char_type_from_block_with_dsym(self):
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
Expand All @@ -53,13 +53,13 @@ def test_unsigned_char_type_with_dwarf(self):
"""Test that 'unsigned char'-type variables are displayed correctly."""
self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), dsym=False, qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_short_type_with_dsym(self):
"""Test that short-type variables are displayed correctly."""
self.build_and_run('short.cpp', set(['short']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_short_type_from_block_with_dsym(self):
"""Test that short-type variables are displayed correctly from a block."""
Expand All @@ -70,13 +70,13 @@ def test_short_type_with_dwarf(self):
"""Test that short-type variables are displayed correctly."""
self.build_and_run('short.cpp', set(['short']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_short_type_with_dsym(self):
"""Test that 'unsigned_short'-type variables are displayed correctly."""
self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_short_type_from_block_with_dsym(self):
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
Expand All @@ -87,13 +87,13 @@ def test_unsigned_short_type_with_dwarf(self):
"""Test that 'unsigned short'-type variables are displayed correctly."""
self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_int_type_with_dsym(self):
"""Test that int-type variables are displayed correctly."""
self.build_and_run('int.cpp', set(['int']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_int_type_from_block_with_dsym(self):
"""Test that int-type variables are displayed correctly from a block."""
Expand All @@ -104,13 +104,13 @@ def test_int_type_with_dwarf(self):
"""Test that int-type variables are displayed correctly."""
self.build_and_run('int.cpp', set(['int']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_int_type_with_dsym(self):
"""Test that 'unsigned_int'-type variables are displayed correctly."""
self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_int_type_from_block_with_dsym(self):
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
Expand All @@ -121,13 +121,13 @@ def test_unsigned_int_type_with_dwarf(self):
"""Test that 'unsigned int'-type variables are displayed correctly."""
self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_type_with_dsym(self):
"""Test that long-type variables are displayed correctly."""
self.build_and_run('long.cpp', set(['long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_type_from_block_with_dsym(self):
"""Test that long-type variables are displayed correctly from a block."""
Expand All @@ -138,13 +138,13 @@ def test_long_type_with_dwarf(self):
"""Test that long-type variables are displayed correctly."""
self.build_and_run('long.cpp', set(['long']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_type_with_dsym(self):
"""Test that 'unsigned long'-type variables are displayed correctly."""
self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_type_from_block_with_dsym(self):
"""Test that 'unsigned_long'-type variables are displayed correctly from a block."""
Expand All @@ -158,13 +158,13 @@ def test_unsigned_long_type_with_dwarf(self):
# rdar://problem/8482903
# test suite failure for types dir -- "long long" and "unsigned long long"

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_long_type_with_dsym(self):
"""Test that 'long long'-type variables are displayed correctly."""
self.build_and_run('long_long.cpp', set(['long long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_long_type_from_block_with_dsym(self):
"""Test that 'long_long'-type variables are displayed correctly from a block."""
Expand All @@ -175,13 +175,13 @@ def test_long_long_type_with_dwarf(self):
"""Test that 'long long'-type variables are displayed correctly."""
self.build_and_run('long_long.cpp', set(['long long']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_long_type_with_dsym(self):
"""Test that 'unsigned long long'-type variables are displayed correctly."""
self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_long_type_from_block_with_dsym(self):
"""Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
Expand Down
42 changes: 21 additions & 21 deletions lldb/test/types/TestIntegerTypesExpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest2
import lldb
import sys
from lldbtest import dsym_test, dwarf_test
from lldbtest import *

class IntegerTypesExprTestCase(AbstractBase.GenericTester):

Expand All @@ -19,13 +19,13 @@ def setUp(self):
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_char_type_with_dsym(self):
"""Test that char-type variable expressions are evaluated correctly."""
self.build_and_run_expr('char.cpp', set(['char']), qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_char_type_from_block_with_dsym(self):
"""Test that char-type variables are displayed correctly from a block."""
Expand All @@ -36,13 +36,13 @@ def test_char_type_with_dwarf(self):
"""Test that char-type variable expressions are evaluated correctly."""
self.build_and_run_expr('char.cpp', set(['char']), dsym=False, qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_char_type_with_dsym(self):
"""Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_char_type_from_block_with_dsym(self):
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
Expand All @@ -53,13 +53,13 @@ def test_unsigned_char_type_with_dwarf(self):
"""Test that 'unsigned char'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), dsym=False, qd=True)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_short_type_with_dsym(self):
"""Test that short-type variable expressions are evaluated correctly."""
self.build_and_run_expr('short.cpp', set(['short']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_short_type_from_block_with_dsym(self):
"""Test that short-type variables are displayed correctly from a block."""
Expand All @@ -70,13 +70,13 @@ def test_short_type_with_dwarf(self):
"""Test that short-type variable expressions are evaluated correctly."""
self.build_and_run_expr('short.cpp', set(['short']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_short_type_with_dsym(self):
"""Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_short_type_from_block_with_dsym(self):
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
Expand All @@ -87,13 +87,13 @@ def test_unsigned_short_type_with_dwarf(self):
"""Test that 'unsigned short'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_int_type_with_dsym(self):
"""Test that int-type variable expressions are evaluated correctly."""
self.build_and_run_expr('int.cpp', set(['int']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_int_type_from_block_with_dsym(self):
"""Test that int-type variables are displayed correctly from a block."""
Expand All @@ -104,13 +104,13 @@ def test_int_type_with_dwarf(self):
"""Test that int-type variable expressions are evaluated correctly."""
self.build_and_run_expr('int.cpp', set(['int']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_int_type_with_dsym(self):
"""Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_int_type_from_block_with_dsym(self):
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
Expand All @@ -121,13 +121,13 @@ def test_unsigned_int_type_with_dwarf(self):
"""Test that 'unsigned int'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_type_with_dsym(self):
"""Test that long-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long.cpp', set(['long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_type_from_block_with_dsym(self):
"""Test that long-type variables are displayed correctly from a block."""
Expand All @@ -138,13 +138,13 @@ def test_long_type_with_dwarf(self):
"""Test that long-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long.cpp', set(['long']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_type_with_dsym(self):
"""Test that 'unsigned long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_type_from_block_with_dsym(self):
"""Test that 'unsigned_long'-type variables are displayed correctly from a block."""
Expand All @@ -158,13 +158,13 @@ def test_unsigned_long_type_with_dwarf(self):
# rdar://problem/8482903
# test suite failure for types dir -- "long long" and "unsigned long long"

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_long_type_with_dsym(self):
"""Test that 'long long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long_long.cpp', set(['long long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_long_long_type_from_block_with_dsym(self):
"""Test that 'long_long'-type variables are displayed correctly from a block."""
Expand All @@ -175,13 +175,13 @@ def test_long_long_type_with_dwarf(self):
"""Test that 'long long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long_long.cpp', set(['long long']), dsym=False)

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_long_type_with_dsym(self):
"""Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']))

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
@dsym_test
def test_unsigned_long_long_type_from_block_with_dsym(self):
"""Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/warnings/uuid/TestAddDsymCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lldb
from lldbtest import *

@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@skipUnlessDarwin
class AddDsymCommandCase(TestBase):

mydir = TestBase.compute_mydir(__file__)
Expand Down