self.buildDsym()
self.breakpoint_conditions_python()
+ @expectedFailureLinux # bugzilla 14426
@dwarf_test
def test_breakpoint_condition_with_dwarf_and_run_command(self):
"""Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
self.buildDwarf()
self.breakpoint_conditions()
+ @expectedFailureLinux # bugzilla 14426
@dwarf_test
def test_breakpoint_condition_inline_with_dwarf_and_run_command(self):
"""Exercise breakpoint condition inline with 'breakpoint set'."""
self.buildDwarf()
self.breakpoint_conditions(inline=True)
+ @expectedFailureLinux # bugzilla 14426
@python_api_test
@dwarf_test
def test_breakpoint_condition_with_dwarf_and_python_api(self):
"""Test that 'de' completes to 'detach '."""
self.complete_from_to('de', 'detach ')
+ @expectedFailureLinux # bugzilla 14425
def test_process_attach_dash_dash_con(self):
"""Test that 'process attach --con' completes to 'process attach --continue '."""
self.complete_from_to('process attach --con', 'process attach --continue ')
self.line_d_function = line_number('d.c',
'// Find this line number within d_dunction().')
+ @skipOnLinux # bugzilla 14424 - missing linux Makefiles/testcase support
def test_modules_search_paths(self):
"""Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'."""
self.expect("target modules list", "LLDB successfully locates the relocated dynamic library",
substrs = [new_dylib])
-
+ @skipOnLinux # bugzilla 14424 - missing linux Makefiles/testcase support
def test_dyld_library_path(self):
"""Test DYLD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else."""
self.expect("target modules list",
substrs = [special_dir, os.path.basename(new_dylib)])
+ @skipOnLinux # bugzilla 14424 - missing linux Makefiles/testcase support
def test_lldb_process_load_and_unload_commands(self):
"""Test that lldb process load/unload command work correctly."""
self.runCmd("process continue")
+ @skipOnLinux # bugzilla 14424 - missing linux Makefiles/testcase support
def test_load_unload(self):
"""Test breakpoint by name works correctly with dlopen'ing."""
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 2'])
+ @skipOnLinux # bugzilla 14424 - missing linux Makefiles/testcase support
def test_step_over_load (self):
"""Test stepping over code that loads a shared library works correctly."""
self.setTearDownCleanup(dictionary=self.d)
self.hello_watchlocation()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_hello_watchlocation_with_dwarf(self):
"""Test watching a location with '-x size' option."""
self.setTearDownCleanup(dictionary=self.d)
self.hello_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self):
"""Test a simple sequence of watchpoint creation and watchpoint hit."""
self.setTearDownCleanup(dictionary=self.d)
self.hello_multiple_threads()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_multiple_threads_with_dwarf(self):
"""Test that lldb watchpoint works for multiple threads."""
self.setTearDownCleanup(dictionary=self.d)
self.hello_multiple_threads_wp_set_and_then_delete()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dwarf(self):
"""Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
self.setTearDownCleanup(dictionary=self.d)
self.normal_read_write_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_rw_watchpoint_with_dwarf(self):
"""Test read_write watchpoint and expect to stop two times."""
self.setTearDownCleanup(dictionary=self.d)
self.delete_read_write_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_rw_watchpoint_delete_with_dwarf(self):
"""Test delete watchpoint and expect not to stop for watchpoint."""
self.setTearDownCleanup(dictionary=self.d)
self.ignore_read_write_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_rw_watchpoint_set_ignore_count_with_dwarf(self):
"""Test watchpoint ignore count and expect to not to stop at all."""
self.setTearDownCleanup(dictionary=self.d)
self.read_write_watchpoint_disable_after_first_stop()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_rw_disable_after_first_stop__with_dwarf(self):
"""Test read_write watchpoint but disable it after the first stop."""
self.setTearDownCleanup(dictionary=self.d)
self.read_write_watchpoint_disable_then_enable()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_rw_disable_then_enable_with_dwarf(self):
"""Test read_write watchpoint, disable initially, then enable it."""
self.setTearDownCleanup(dictionary=self.d)
self.watchpoint_command()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_command_with_dwarf(self):
"""Test 'watchpoint command'."""
self.setTearDownCleanup(dictionary=self.d)
self.watchpoint_command_can_disable_a_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_command_can_disable_a_watchpoint_with_dwarf(self):
"""Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
self.setTearDownCleanup(dictionary=self.d)
self.watchpoint_command()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_command_with_dwarf(self):
"""Test 'watchpoint command'."""
self.setTearDownCleanup(dictionary=self.d)
self.watchpoint_condition()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_cond_with_dwarf(self):
"""Test watchpoint condition."""
self.setTearDownCleanup(dictionary=self.d)
self.watchlocation_using_watchpoint_set()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchlocation_with_dwarf_using_watchpoint_set(self):
"""Test watching a location with 'watchpoint set expression -w write -x size' option."""
self.buildDsym()
self.cpp_exceptions()
+ @expectedFailureLinux # bugzilla 14423
@dwarf_test
def test_with_dwarf(self):
"""Test lldb exception breakpoint command for CPP."""
self.buildDsym()
self.ivars_in_blocks()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
# This test requires the 2.0 runtime, so it will fail on i386.
@expectedFailurei386
self.find_global_variables_then_object_description('a.out')
# rdar://problem/10857337
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_find_global_variables_then_object_description_with_dwarf(self):
self.buildDsym()
self.do_testObjCXXClasses()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_break_with_dwarf(self):
"""Test ivars of Objective-C++ classes"""
self.buildDsym()
self.do_test_checkers()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_objc_checker_with_dwarf(self):
self.buildDsym()
self.objc_class_method()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@expectedFailurei386
@python_api_test
@dwarf_test
self.buildDsym()
self.do_get_dynamic_vals()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_get_objc_dynamic_vals_with_dwarf(self):
self.buildDsym()
self.objc_ivar_offsets()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
self.buildDsym()
self.do_test_properties()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_objc_properties_with_dwarf(self):
self.buildDsym()
self.objc_static_method()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
#<rdar://problem/9745789> "expression" can't call functions in class methods
@dwarf_test
self.buildDsym()
self.objc_stepping()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
self.buildDsym()
self.self_commands()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_with_dwarf_and_run_command(self):
"""Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
raise case._UnexpectedSuccess
return wrapper
+def expectedFailureLinux(func):
+ """Decorate the item as a Linux only expectedFailure."""
+ if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+ raise Exception("@expectedFailureLinux can only be used to decorate a test method")
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ from unittest2 import case
+ self = args[0]
+ platform = sys.platform
+ try:
+ func(*args, **kwargs)
+ except Exception:
+ if "linux" in platform:
+ raise case._ExpectedFailure(sys.exc_info())
+ else:
+ raise
+
+ if "linux" in platform:
+ raise case._UnexpectedSuccess
+ return wrapper
+
+def skipOnLinux(func):
+ """Decorate the item to skip tests that should be skipped on Linux."""
+ if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+ raise Exception("@skipOnLinux can only be used to decorate a test method")
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ from unittest2 import case
+ self = args[0]
+ platform = sys.platform
+ if "linux" in platform:
+ self.skipTest("skip on linux")
+ else:
+ func(self, *args, **kwargs)
+ return wrapper
+
class Base(unittest2.TestCase):
"""
Abstract base for performing lldb (see TestBase) or other generic tests (see
self.setTearDownCleanup(dictionary=d)
self.step_out_of_malloc_into_function_b(self.exe_name)
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_step_out_of_malloc_into_function_b_with_dwarf(self):
self.buildDsym()
self.do_set_watchpoint()
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_watch_val_with_dwarf(self):
self.buildDsym()
self.do_watchpoint_ignore_count()
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_set_watch_ignore_count_with_dwarf(self):
self.buildDsym()
self.do_watchpoint_iter()
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_watch_iter_with_dwarf(self):
self.setTearDownCleanup(dictionary=self.d)
self.watchpoint_condition_api()
+ @expectedFailureLinux # bugzilla 14416
@dwarf_test
def test_watchpoint_cond_api_with_dwarf(self):
"""Test watchpoint condition API."""
self.buildDsym()
self.do_set_watchlocation()
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_watch_location_with_dwarf(self):
self.buildDsym()
self.do_set_watchaddress()
+ @expectedFailureLinux # bugzilla 14416
@python_api_test
@dwarf_test
def test_watch_address_with_dwarf(self):