diff options
author | Pavel Labath <labath@google.com> | 2015-10-26 09:28:32 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-10-26 09:28:32 +0000 |
commit | dc8b2d3d3aa4cedd66ee5b113ee8cc535f2c5a04 (patch) | |
tree | 365be13e36b28ecc015ac24911b0b78e84723232 /lldb/test/lang/objc | |
parent | 4cfc9198616f535f3d3a0b6b3e9e5f8a2e76988f (diff) | |
download | bcm5719-llvm-dc8b2d3d3aa4cedd66ee5b113ee8cc535f2c5a04.tar.gz bcm5719-llvm-dc8b2d3d3aa4cedd66ee5b113ee8cc535f2c5a04.zip |
Port the python api decorator to use test categories
Summary:
Per discussions on the mailing list, I have implemented a decorator which annotates individual
test methods with categories. I have used this framework to replace the '-a' and '+a'
command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test
decorator (now @add_test_categories('pyapi')). The test suite now gives an error message
suggesting the new options if the user specifies the deprecated +/-a switches. If the general
direction is good, I will follow this up with other switches.
Reviewers: tberghammer, tfiala, granata.enrico, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D14020
llvm-svn: 251277
Diffstat (limited to 'lldb/test/lang/objc')
18 files changed, 18 insertions, 18 deletions
diff --git a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py index 5e9d55af5d5..2403823d560 100644 --- a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py +++ b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py @@ -22,7 +22,7 @@ class TestObjCIvarsInBlocks(TestBase): self.class_source_file_spec = lldb.SBFileSpec(self.class_source) @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) @expectedFailurei386 # 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""" diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py index ee5fab5f37c..39af9af6da9 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py @@ -174,7 +174,7 @@ class FoundationTestCase(TestBase): self.expect("expression --object-description -- my", "Object description displayed correctly", patterns = ["Hello from.*a.out.*with timestamp: "]) - @python_api_test + @add_test_categories(['pyapi']) def test_print_ivars_correctly (self): self.build() # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py index f0b1d0d083e..5fe59c23780 100644 --- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py +++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py @@ -24,7 +24,7 @@ class ObjectDescriptionAPITestCase(TestBase): # rdar://problem/10857337 @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_find_global_variables_then_object_description(self): """Exercise SBTarget.FindGlobalVariables() API.""" d = {'EXE': 'b.out'} diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py index 378147e40e1..620ada67cfb 100644 --- a/lldb/test/lang/objc/foundation/TestSymbolTable.py +++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py @@ -27,7 +27,7 @@ class FoundationSymtabTestCase(TestBase): 'main' ] - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test symbol table access with Python APIs.""" self.build() diff --git a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py index d7cdda1500d..d02103c7c47 100644 --- a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py +++ b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py @@ -22,7 +22,7 @@ class ObjCDynamicValueTestCase(TestBase): self.line = line_number('main.m', '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_get_baseclass(self): """Test fetching ObjC dynamic values.""" if self.getArchitecture() == 'i386': diff --git a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py index 95a5414460d..3b07320ccc8 100644 --- a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py +++ b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py @@ -21,7 +21,7 @@ class TestObjCBuiltinTypes(TestBase): self.break_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) #<rdar://problem/10591460> [regression] Can't print ivar value: error: reference to 'id' is ambiguous def test_with_python_api(self): """Test expression parser respect for ObjC built-in types.""" diff --git a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py index b3c44435b3d..e4708d6c493 100644 --- a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py +++ b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py @@ -23,7 +23,7 @@ class ObjCCheckerTestCase(TestBase): self.source_name = 'main.m' @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_objc_checker(self): """Test that checkers catch unrecognized selectors""" if self.getArchitecture() == 'i386': diff --git a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py index a22a2c012fc..31db76877e4 100644 --- a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py +++ b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py @@ -22,7 +22,7 @@ class TestObjCClassMethod(TestBase): @skipUnlessDarwin @expectedFailurei386 - @python_api_test + @add_test_categories(['pyapi']) #rdar://problem/9745789 "expression" can't call functions in class methods def test_with_python_api(self): """Test calling functions in class methods.""" diff --git a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py index 7c2b7dce6ff..cc810d8682c 100644 --- a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py +++ b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py @@ -29,7 +29,7 @@ class ObjCDynamicValueTestCase(TestBase): '// Break here to see if we can step into real method.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107") def test_get_objc_dynamic_vals(self): """Test fetching ObjC dynamic values.""" diff --git a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py index c53d84c82e4..0be0150a0b0 100644 --- a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py +++ b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py @@ -21,7 +21,7 @@ class TestObjCIvarOffsets(TestBase): self.stop_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test printing ObjC objects that use unbacked properties""" self.build() diff --git a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py index de529e8fa86..f49ad7165a7 100644 --- a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py +++ b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py @@ -23,7 +23,7 @@ class TestObjCIvarStripped(TestBase): @skipUnlessDarwin @skipIfDwarf # This test requires a stripped binary and a dSYM @skipIfDWO # This test requires a stripped binary and a dSYM - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test that we can find stripped Objective-C ivars in the runtime""" self.build() diff --git a/lldb/test/lang/objc/objc-property/TestObjCProperty.py b/lldb/test/lang/objc/objc-property/TestObjCProperty.py index 0806776a690..83291431305 100644 --- a/lldb/test/lang/objc/objc-property/TestObjCProperty.py +++ b/lldb/test/lang/objc/objc-property/TestObjCProperty.py @@ -23,7 +23,7 @@ class ObjCPropertyTestCase(TestBase): self.source_name = 'main.m' @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_objc_properties(self): """Test that expr uses the correct property getters and setters""" if self.getArchitecture() == 'i386': diff --git a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py index 6d230f22f43..d74c5a1e9d6 100644 --- a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py +++ b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py @@ -21,7 +21,7 @@ class TestObjCStaticMethodStripped(TestBase): self.break_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) @skipIfDwarf # This test requires a stripped binary and a dSYM @skipIfDWO # This test requires a stripped binary and a dSYM #<rdar://problem/12042992> diff --git a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py index 290d29e0df5..edd774335cf 100644 --- a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py +++ b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py @@ -21,7 +21,7 @@ class TestObjCStaticMethod(TestBase): self.break_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) #<rdar://problem/9745789> "expression" can't call functions in class methods def test_with_python_api(self): """Test calling functions in static methods.""" diff --git a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py index 2f51a9ade84..be29114fdfa 100644 --- a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py +++ b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py @@ -28,7 +28,7 @@ class TestObjCStepping(TestBase): self.stepped_past_nil_line = line_number (self.main_source, '// Step over nil should stop here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test stepping through ObjC method dispatch in various forms.""" self.build() diff --git a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py index 1b4388febeb..4d3386fd053 100644 --- a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py +++ b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py @@ -21,7 +21,7 @@ class TestObjCStructArgument(TestBase): self.break_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test passing structs to Objective-C methods.""" self.build() diff --git a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py index 60455687a48..b5a01f04e33 100644 --- a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py +++ b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py @@ -21,7 +21,7 @@ class TestObjCClassMethod(TestBase): self.break_line = line_number(self.main_source, '// Set breakpoint here.') @skipUnlessDarwin - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test calling functions in class methods.""" self.build() diff --git a/lldb/test/lang/objc/objc-super/TestObjCSuper.py b/lldb/test/lang/objc/objc-super/TestObjCSuper.py index 051cb253eb9..414a1a8d456 100644 --- a/lldb/test/lang/objc/objc-super/TestObjCSuper.py +++ b/lldb/test/lang/objc/objc-super/TestObjCSuper.py @@ -22,7 +22,7 @@ class TestObjCSuperMethod(TestBase): @skipUnlessDarwin @expectedFailurei386 - @python_api_test + @add_test_categories(['pyapi']) def test_with_python_api(self): """Test calling methods on super.""" self.build() |