summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/cpp
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/lang/cpp
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/lang/cpp')
-rw-r--r--lldb/test/lang/cpp/class_static/TestStaticVariables.py2
-rw-r--r--lldb/test/lang/cpp/class_types/TestClassTypes.py2
-rw-r--r--lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py2
-rw-r--r--lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py4
-rw-r--r--lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py2
-rw-r--r--lldb/test/lang/cpp/stl/TestSTL.py2
6 files changed, 7 insertions, 7 deletions
diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
index ba770af9826..5bb54810f2e 100644
--- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
@@ -52,7 +52,7 @@ class StaticVariableTestCase(TestBase):
@expectedFailureClang('Clang emits incomplete debug info.')
@expectedFailureFreeBSD('llvm.org/pr20550 failing on FreeBSD-11')
@expectedFailureGcc('GCC emits incomplete debug info.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_python_api(self):
"""Test Python APIs on file and class static variables."""
self.build()
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py
index 9a46f5df36f..3fda9e4faa5 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py
@@ -52,7 +52,7 @@ class ClassTypesTestCase(TestBase):
substrs = ['C *',
' this = '])
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_python_api(self):
"""Use Python APIs to create a breakpoint by (filespec, line)."""
self.build()
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index f9e0f5fcd9c..cbb34560254 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -36,7 +36,7 @@ class IterateFrameAndDisassembleTestCase(TestBase):
#print("function:", function)
self.runCmd("disassemble -n '%s'" % function)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_and_python_api(self):
"""Disassemble each call frame when stopped on C's constructor."""
self.build()
diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
index 4d620a90725..bcefda2caaf 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -17,14 +17,14 @@ class CppValueCastTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@unittest2.expectedFailure("rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_value_cast_with_virtual_inheritance(self):
"""Test SBValue::Cast(SBType) API for C++ types with virtual inheritance."""
self.build(dictionary=self.d_virtual)
self.setTearDownCleanup(dictionary=self.d_virtual)
self.do_sbvalue_cast(self.exe_name)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_value_cast_with_regular_inheritance(self):
"""Test SBValue::Cast(SBType) API for C++ types with regular inheritance."""
self.build(dictionary=self.d_regular)
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 7095e42721c..4f1cd5e31c8 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -29,7 +29,7 @@ class DynamicValueTestCase(TestBase):
@expectedFailureFreeBSD # FIXME: This needs to be root-caused.
@expectedFailureWindows("llvm.org/pr24663")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_dynamic_vals(self):
"""Test fetching C++ dynamic values from pointers & references."""
self.build(dictionary=self.getBuildFlags())
diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py
index 66a8dce143f..4c7636cc74a 100644
--- a/lldb/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/test/lang/cpp/stl/TestSTL.py
@@ -68,7 +68,7 @@ class STLTestCase(TestBase):
substrs = [' = 2'])
@expectedFailureIcc # icc 13.1 and 14-beta do not emit DW_TAG_template_type_parameter
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_SBType_template_aspects(self):
"""Test APIs for getting template arguments from an SBType."""
self.build()
OpenPOWER on IntegriCloud