From dc8b2d3d3aa4cedd66ee5b113ee8cc535f2c5a04 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 26 Oct 2015 09:28:32 +0000 Subject: 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 --- lldb/test/python_api/thread/TestThreadAPI.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lldb/test/python_api/thread/TestThreadAPI.py') diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py index 4d8e9b4872d3..e76bb658f383 100644 --- a/lldb/test/python_api/thread/TestThreadAPI.py +++ b/lldb/test/python_api/thread/TestThreadAPI.py @@ -15,19 +15,19 @@ class ThreadAPITestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @python_api_test + @add_test_categories(['pyapi']) def test_get_process(self): """Test Python SBThread.GetProcess() API.""" self.build() self.get_process() - @python_api_test + @add_test_categories(['pyapi']) def test_get_stop_description(self): """Test Python SBThread.GetStopDescription() API.""" self.build() self.get_stop_description() - @python_api_test + @add_test_categories(['pyapi']) def test_run_to_address(self): """Test Python SBThread.RunToAddress() API.""" # We build a different executable than the default build() does. @@ -36,7 +36,7 @@ class ThreadAPITestCase(TestBase): self.setTearDownCleanup(dictionary=d) self.run_to_address(self.exe_name) - @python_api_test + @add_test_categories(['pyapi']) @expectedFailureFreeBSD # llvm.org/pr20476 @expectedFailureWindows # Test crashes def test_step_out_of_malloc_into_function_b(self): @@ -47,7 +47,7 @@ class ThreadAPITestCase(TestBase): self.setTearDownCleanup(dictionary=d) self.step_out_of_malloc_into_function_b(self.exe_name) - @python_api_test + @add_test_categories(['pyapi']) def test_step_over_3_times(self): """Test Python SBThread.StepOver() API.""" # We build a different executable than the default build() does. -- cgit v1.2.3