summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/objc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/objc')
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py4
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m52
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py4
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py15
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py17
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-property/main.m13
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py2
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py68
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py4
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m31
52 files changed, 320 insertions, 76 deletions
diff --git a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
new file mode 100644
index 0000000000000..01bf241b03816
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows, decorators.expectedFailureAll(bugnumber="rdar://problem/17990991")])
diff --git a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
new file mode 100644
index 0000000000000..9ee3bbe667707
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
@@ -0,0 +1,52 @@
+//===-- main.m -------------------------------------------*- Objective-C-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#import <Foundation/Foundation.h>
+
+@interface HasBitfield : NSObject {
+@public
+ unsigned field1 : 1;
+ unsigned field2 : 1;
+};
+
+-(id)init;
+@end
+
+@implementation HasBitfield
+-(id)init {
+ self = [super init];
+ field1 = 0;
+ field2 = 1;
+ return self;
+}
+@end
+
+@interface ContainsAHasBitfield : NSObject {
+@public
+ HasBitfield *hb;
+};
+-(id)init;
+@end
+
+@implementation ContainsAHasBitfield
+-(id)init {
+ self = [super init];
+ hb = [[HasBitfield alloc] init];
+ return self;
+}
+
+@end
+
+int main(int argc, const char * argv[]) {
+ ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init];
+ printf("%d\n", chb->hb->field2); //% self.expect("expression -- chb->hb->field1", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 0"])
+ //% self.expect("expression -- chb->hb->field2", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 1"]) # this must happen second
+ return 0;
+}
+
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
index 6a1cde1a3cb37..9fa03071c598b 100644
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ b/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class TestObjCIvarsInBlocks(TestBase):
@@ -23,7 +24,7 @@ class TestObjCIvarsInBlocks(TestBase):
@skipUnlessDarwin
@add_test_categories(['pyapi'])
- @expectedFailurei386 # This test requires the 2.0 runtime, so it will fail on i386.
+ @expectedFailureAll(archs=["i[3-6]86"], bugnumber="This test requires the 2.0 runtime, so it will fail on i386")
def test_with_python_api(self):
"""Test printing the ivars of the self when captured in blocks"""
self.build()
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py b/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
index 207518abc91b1..c153f9856603e 100644
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
+++ b/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class ForwardDeclTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
index a9298dd81cf8d..4a62d6240d980 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class ConstStringTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
index 88db12e959316..0867eec62ebe5 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import unittest2
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class FoundationDisassembleTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
index 8358bd5e923fc..2a8e80f6d76ee 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
@@ -10,8 +10,9 @@ from __future__ import print_function
import os, os.path, time
import lldb
import string
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
file_index = 0
@skipUnlessDarwin
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
index b61a7702f1fe7..1ee01f7f35f6c 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class FoundationTestCase2(TestBase):
@@ -89,6 +90,7 @@ class FoundationTestCase2(TestBase):
patterns = ["\(int\) \$.* = 3"])
self.runCmd("process continue")
+ @expectedFailureAll(oslist=["macosx"], debug_info="gmodules", bugnumber="llvm.org/pr27861")
def test_NSString_expr_commands(self):
"""Test expression commands for NSString."""
self.build()
@@ -134,7 +136,7 @@ class FoundationTestCase2(TestBase):
patterns = ["\(MyString\) \$.* = ", "\(MyBase\)", "\(NSObject\)", "\(Class\)"])
self.runCmd("process continue")
- @expectedFailurei386
+ @expectedFailureAll(archs=["i[3-6]86"])
def test_NSError_po(self):
"""Test that po of the result of an unknown method doesn't require a cast."""
self.build()
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
index a85f0fec9636b..13ef44f195bbd 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjectDescriptionAPITestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
index 8f191721d89b7..8b37f9309ac60 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
@@ -8,14 +8,16 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class RuntimeTypesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
+ @expectedFailureAll(oslist=["macosx"], debug_info="gmodules", bugnumber="llvm.org/pr27862")
def test_break(self):
"""Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
if self.getArchitecture() != 'x86_64':
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
index 72952c1878b14..b75a874c81450 100644
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
+++ b/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
@@ -6,9 +6,13 @@ from __future__ import print_function
-import os, time
+import os
+import time
+
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class FoundationSymtabTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py b/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
index c4c581b9240f6..24ae1a8852b14 100644
--- a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
+++ b/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCGlobalVar(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
index e85dd8f48dec6..ee5589cb96cb7 100644
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -5,11 +5,14 @@ from __future__ import print_function
import unittest2
-import os, time
+import os
+import subprocess
+import time
+
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-import subprocess
+from lldbsuite.test import lldbutil
class HiddenIvarsTestCase(TestBase):
@@ -26,8 +29,7 @@ class HiddenIvarsTestCase(TestBase):
self.shlib_names = ["InternalDefiner"]
@skipUnlessDarwin
- @skipIfDwarf # This test requires a stripped binary and a dSYM
- @skipIfDWO # This test requires a stripped binary and a dSYM
+ @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
def test_expr_stripped(self):
if self.getArchitecture() == 'i386':
self.skipTest("requires modern objc runtime")
@@ -44,8 +46,7 @@ class HiddenIvarsTestCase(TestBase):
self.expr(False)
@skipUnlessDarwin
- @skipIfDwarf # This test requires a stripped binary and a dSYM
- @skipIfDWO # This test requires a stripped binary and a dSYM
+ @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
def test_frame_variable_stripped(self):
if self.getArchitecture() == 'i386':
self.skipTest("requires modern objc runtime")
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
index 9ed2bb98e6e19..b91725d57c603 100644
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
@@ -8,10 +8,12 @@ from __future__ import print_function
import os, time
import re
+
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.support import seven
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.support.seven as seven
+from lldbsuite.test import lldbutil
def execute_command (command):
# print('%% %s' % (command))
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
index 2c052aae3ba1a..fece47625a849 100644
--- a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ b/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
@@ -4,15 +4,15 @@ from __future__ import print_function
+from distutils.version import StrictVersion
import unittest2
import os, time
import lldb
import platform
-import lldbsuite.test.lldbutil as lldbutil
-
-from distutils.version import StrictVersion
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCModulesAutoImportTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
index 8667e628d4640..56fcaa050782a 100644
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
+++ b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
@@ -5,14 +5,12 @@ from __future__ import print_function
import unittest2
-import os, time
-import lldb
import platform
-import lldbsuite.test.lldbutil as lldbutil
-
from distutils.version import StrictVersion
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class IncompleteModulesTestCase(TestBase):
@@ -27,6 +25,7 @@ class IncompleteModulesTestCase(TestBase):
@skipUnlessDarwin
@unittest2.expectedFailure("rdar://20416388")
@unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ @skipIfDarwin # llvm.org/pr26267
def test_expr(self):
self.build()
exe = os.path.join(os.getcwd(), "a.out")
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
index d9d94a8cf3213..6a9d9b518e1cb 100644
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
+++ b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
@@ -4,15 +4,16 @@ from __future__ import print_function
+from distutils.version import StrictVersion
+
import unittest2
import os, time
-import lldb
import platform
-import lldbsuite.test.lldbutil as lldbutil
-
-from distutils.version import StrictVersion
+import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ModulesInlineFunctionsTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py b/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
index 04fc072818115..0efdb305584b9 100644
--- a/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
+++ b/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
@@ -6,13 +6,13 @@ from __future__ import print_function
import unittest2
import os, time
-import lldb
import platform
-import lldbsuite.test.lldbutil as lldbutil
-
from distutils.version import StrictVersion
+import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCModulesTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py b/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
index 38ef853ae1127..c702eafa1f226 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class ObjCXXTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
index 5d2414eed8f50..fa390cb0ad73b 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCDynamicValueTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
index f7ce2809081a3..3ff76d4194d2f 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCBuiltinTypes(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py b/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
index 533ec2f6b7c41..901d84fb96d9d 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCCheckerTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
index 2a978bc9c0241..a5767562c0770 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCClassMethod(TestBase):
@@ -21,7 +22,7 @@ class TestObjCClassMethod(TestBase):
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
@skipUnlessDarwin
- @expectedFailurei386
+ @expectedFailureAll(archs=["i[3-6]86"])
@add_test_categories(['pyapi'])
#rdar://problem/9745789 "expression" can't call functions in class methods
def test_with_python_api(self):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
index b9e84541e2dfa..fc8a8129fa3cc 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class ObjCDynamicSBTypeTestCase(TestBase):
@@ -25,7 +26,7 @@ class ObjCDynamicSBTypeTestCase(TestBase):
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- @skipIfi386
+ @skipIf(archs="i[3-6]86")
def test_dyn(self):
"""Test that we are able to properly report a usable dynamic type."""
d = {'EXE': self.exe_name}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
index acddfb8bd647e..8720ede04cbf1 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCDynamicValueTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
index 6be1d379c8ebb..049b41e08d082 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class TestObjCIvarOffsets(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
index 80305e303d038..791ce27dad00e 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
@@ -1,4 +1,4 @@
-import lldbsuite.test.lldbinline as lldbinline
-import lldbsuite.test.lldbtest as lldbtest
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
-lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows])
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
index 78c7123eefca7..d9007c57bfb44 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class TestObjCIvarStripped(TestBase):
@@ -21,8 +22,7 @@ class TestObjCIvarStripped(TestBase):
self.stop_line = line_number(self.main_source, '// Set breakpoint here.')
@skipUnlessDarwin
- @skipIfDwarf # This test requires a stripped binary and a dSYM
- @skipIfDWO # This test requires a stripped binary and a dSYM
+ @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
@add_test_categories(['pyapi'])
def test_with_python_api(self):
"""Test that we can find stripped Objective-C ivars in the runtime"""
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
index ca77de2618296..a0cf6a7a055db 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
@@ -6,13 +6,14 @@ from __future__ import print_function
import unittest2
import os, time
-import lldb
import platform
-import lldbsuite.test.lldbutil as lldbutil
from distutils.version import StrictVersion
+import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCNewSyntaxTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py b/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
index a4a202e3f9408..2c3ac27d418f5 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
@@ -13,10 +13,12 @@ from __future__ import print_function
import os, time
import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
import re
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
# rdar://problem/9087739
# test failure: objc_optimized does not work for "-C clang -A i386"
@skipUnlessDarwin
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py b/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
index c22a1f1ad532a..22fe3136a5114 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class ObjCPropertyTestCase(TestBase):
@@ -112,3 +113,17 @@ class ObjCPropertyTestCase(TestBase):
idWithProtocol_error = idWithProtocol_value.GetError()
self.assertTrue (idWithProtocol_error.Success())
self.assertTrue (idWithProtocol_value.GetTypeName() == "id")
+
+ # Make sure that class property getter works as expected
+ value = frame.EvaluateExpression("BaseClass.classInt", False)
+ self.assertTrue (value.GetError().Success())
+ self.assertTrue (value.GetValueAsUnsigned (11111) == 123)
+
+ # Make sure that class property setter works as expected
+ value = frame.EvaluateExpression("BaseClass.classInt = 234", False)
+ self.assertTrue (value.GetError().Success())
+
+ # Verify that setter above actually worked
+ value = frame.EvaluateExpression("BaseClass.classInt", False)
+ self.assertTrue (value.GetError().Success())
+ self.assertTrue (value.GetValueAsUnsigned (11111) == 234)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
index 2ef142be9b00d..8d14759fb384d 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
@@ -6,6 +6,8 @@
@end
+static int _class_int = 123;
+
@interface BaseClass : NSObject
{
int _backedInt;
@@ -25,6 +27,7 @@
@property(getter=myGetUnbackedInt,setter=mySetUnbackedInt:) int unbackedInt;
@property int backedInt;
@property (nonatomic, assign) id <MyProtocol> idWithProtocol;
+@property(class) int classInt;
@end
@implementation BaseClass
@@ -68,6 +71,16 @@
_access_count++;
}
++ (int) classInt
+{
+ return _class_int;
+}
+
++ (void) setClassInt:(int) n
+{
+ _class_int = n;
+}
+
- (int) getAccessCount
{
return _access_count;
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py b/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
index 80305e303d038..791ce27dad00e 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
@@ -1,4 +1,4 @@
-import lldbsuite.test.lldbinline as lldbinline
-import lldbsuite.test.lldbtest as lldbtest
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
-lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows])
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
index 81e7f12dea2b2..6c5492dade11c 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
@@ -7,9 +7,10 @@ default: a.out.stripped
a.out.stripped: a.out.dSYM
strip -o a.out.stripped a.out
+ ln -sf a.out.dSYM a.out.stripped.dSYM
clean::
rm -f a.out.stripped
- rm -rf a.out.stripped.dSYM
+ rm -rf $(wildcard *.dSYM)
include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
index 4bcc10b8b8826..7d88292a051c3 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCStaticMethodStripped(TestBase):
@@ -22,15 +23,14 @@ class TestObjCStaticMethodStripped(TestBase):
@skipUnlessDarwin
@add_test_categories(['pyapi'])
- @skipIfDwarf # This test requires a stripped binary and a dSYM
- @skipIfDWO # This test requires a stripped binary and a dSYM
+ @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
#<rdar://problem/12042992>
def test_with_python_api(self):
"""Test calling functions in static methods with a stripped binary."""
if self.getArchitecture() == 'i386':
self.skipTest("requires modern objc runtime")
self.build()
- exe = os.path.join(os.getcwd(), "a.out.stripped")
+ exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
index 89ef1e7b6898f..ccba42db4ebef 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCStaticMethod(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
index 1df416d45133e..d035287cfa007 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCStepping(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
index 36cde21c9d66f..b2f2af766325e 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCStructArgument(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
index 010de21808257..5a8722e71a45f 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCClassMethod(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py b/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
index 84d147f632dad..39a0fb716abed 100644
--- a/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
class TestObjCSuperMethod(TestBase):
@@ -21,7 +22,7 @@ class TestObjCSuperMethod(TestBase):
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
@skipUnlessDarwin
- @expectedFailurei386
+ @expectedFailureAll(archs=["i[3-6]86"])
@add_test_categories(['pyapi'])
def test_with_python_api(self):
"""Test calling methods on super."""
diff --git a/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py b/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
index 5c52cc0e06979..33f7a0519fa83 100644
--- a/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
+++ b/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
@@ -8,7 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class PrintObjTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index 38551f671a921..32f2e7c8d6dc9 100644
--- a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class MethodReturningBOOLTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py b/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
index 0902527d424c3..a4654d4bd1b48 100644
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ b/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class Rdar10967107TestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
index 42120a57834c1..f1d38f8b7d32e 100644
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class Rdar10967107TestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py b/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
index b95d95106032a..7bc92595ef385 100644
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ b/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
@@ -8,8 +8,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
@skipUnlessDarwin
class Rdar12408181TestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py b/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
index 30fd2a5b0f6d8..c8f9a9c82c619 100644
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
+++ b/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
@@ -6,8 +6,9 @@ from __future__ import print_function
import os, time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class TestRealDefinition(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py b/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
index 37db151f9ae38..004563c55be24 100644
--- a/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
+++ b/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
@@ -2,8 +2,9 @@
Tests that ObjC member variables are available where they should be.
"""
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class ObjCSelfTestCase(TestBase):
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
new file mode 100644
index 0000000000000..ad3cb3fadcde3
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
@@ -0,0 +1,7 @@
+LEVEL = ../../../make
+
+OBJC_SOURCES := main.m
+
+include $(LEVEL)/Makefile.rules
+
+LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
new file mode 100644
index 0000000000000..7c294ef8cc643
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -0,0 +1,68 @@
+"""Test that we properly vend children for a single entry NSDictionary"""
+
+from __future__ import print_function
+
+
+
+import unittest2
+import os, time
+import platform
+
+from distutils.version import StrictVersion
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class ObjCSingleEntryDictionaryTestCase(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line number to break inside main().
+ self.line = line_number('main.m', '// break here')
+
+ @skipUnlessDarwin
+ def test_single_entry_dict(self):
+ self.build()
+ exe = os.path.join(os.getcwd(), "a.out")
+ self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+ # Break inside the foo function which takes a bar_ptr argument.
+ lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+
+ self.runCmd("run", RUN_SUCCEEDED)
+
+ # The stop reason of the thread should be breakpoint.
+ self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ['stopped',
+ 'stop reason = breakpoint'])
+
+ # The breakpoint should have a hit count of 1.
+ self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
+ substrs = [' resolved, hit count = 1'])
+
+ d1 = self.frame().FindVariable("d1")
+ d1.SetPreferSyntheticValue(True)
+ d1.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+
+ self.assertTrue(d1.GetNumChildren() == 1, "dictionary has != 1 child elements")
+ pair = d1.GetChildAtIndex(0)
+ pair.SetPreferSyntheticValue(True)
+ pair.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+
+ self.assertTrue(pair.GetNumChildren() == 2, "pair has != 2 child elements")
+
+ key = pair.GetChildMemberWithName("key")
+ value = pair.GetChildMemberWithName("value")
+
+ key.SetPreferSyntheticValue(True)
+ key.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+ value.SetPreferSyntheticValue(True)
+ value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+
+ self.assertTrue(key.GetSummary() == '@"key"', "key doesn't contain key")
+ self.assertTrue(value.GetSummary() == '@"value"', "value doesn't contain value")
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m
new file mode 100644
index 0000000000000..be472fd43c3db
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m
@@ -0,0 +1,7 @@
+#import <Foundation/Foundation.h>
+
+int main() {
+ NSDictionary *d1 = @{@"key" : @"value"};
+ NSLog(@"%@\n", d1); // break here
+ return 0;
+}
diff --git a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py
new file mode 100644
index 0000000000000..791ce27dad00e
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m
new file mode 100644
index 0000000000000..f48710e880f3a
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m
@@ -0,0 +1,31 @@
+//===-- main.m -------------------------------------------*- Objective-C-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#import <Foundation/Foundation.h>
+
+@interface VarClass : NSObject
+- (id) lottaArgs: (id) first, ...;
+@end
+
+@implementation VarClass
+- (id) lottaArgs: (id) first, ...
+{
+ return first;
+}
+@end
+
+int
+main()
+{
+ VarClass *my_var = [[VarClass alloc] init];
+ id something = [my_var lottaArgs: @"111", @"222", nil];
+ NSLog (@"%@ - %@", my_var, something); //% self.expect("expression -O -- [my_var lottaArgs:@\"111\", @\"222\", nil]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["111"])
+ return 0;
+}
+