summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/target/TestTargetAPI.py
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-10-26 09:28:32 +0000
committerPavel Labath <labath@google.com>2015-10-26 09:28:32 +0000
commitdc8b2d3d3aa4cedd66ee5b113ee8cc535f2c5a04 (patch)
tree365be13e36b28ecc015ac24911b0b78e84723232 /lldb/test/python_api/target/TestTargetAPI.py
parent4cfc9198616f535f3d3a0b6b3e9e5f8a2e76988f (diff)
downloadbcm5719-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/python_api/target/TestTargetAPI.py')
-rw-r--r--lldb/test/python_api/target/TestTargetAPI.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py
index eadae1dc045..176581a167f 100644
--- a/lldb/test/python_api/target/TestTargetAPI.py
+++ b/lldb/test/python_api/target/TestTargetAPI.py
@@ -31,7 +31,7 @@ class TargetAPITestCase(TestBase):
# It does not segfaults now. But for dwarf, the variable value is None if
# the inferior process does not exist yet. The radar has been updated.
#@unittest232.skip("segmentation fault -- skipping")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_find_global_variables(self):
"""Exercise SBTarget.FindGlobalVariables() API."""
d = {'EXE': 'b.out'}
@@ -39,7 +39,7 @@ class TargetAPITestCase(TestBase):
self.setTearDownCleanup(dictionary=d)
self.find_global_variables('b.out')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24778")
def test_find_functions(self):
"""Exercise SBTarget.FindFunctions() API."""
@@ -48,25 +48,25 @@ class TargetAPITestCase(TestBase):
self.setTearDownCleanup(dictionary=d)
self.find_functions('b.out')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_description(self):
"""Exercise SBTarget.GetDescription() API."""
self.build()
self.get_description()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_launch_new_process_and_redirect_stdout(self):
"""Exercise SBTarget.Launch() API."""
self.build()
self.launch_new_process_and_redirect_stdout()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_resolve_symbol_context_with_address(self):
"""Exercise SBTarget.ResolveSymbolContextForAddress() API."""
self.build()
self.resolve_symbol_context_with_address()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_platform(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -75,7 +75,7 @@ class TargetAPITestCase(TestBase):
platform = target.platform
self.assertTrue(platform, VALID_PLATFORM)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_data_byte_size(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -83,7 +83,7 @@ class TargetAPITestCase(TestBase):
target = self.create_simple_target('b.out')
self.assertEquals(target.data_byte_size, 1)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_code_byte_size(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -91,7 +91,7 @@ class TargetAPITestCase(TestBase):
target = self.create_simple_target('b.out')
self.assertEquals(target.code_byte_size, 1)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_resolve_file_address(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -114,7 +114,7 @@ class TargetAPITestCase(TestBase):
self.assertIsNotNone(data_section2)
self.assertEquals(data_section.name, data_section2.name)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_read_memory(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
OpenPOWER on IntegriCloud