From f4862e7a511d5ddebb3995e9c23380d5696f4b10 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Sun, 9 Feb 2025 11:16:18 -0800 Subject: [PATCH] [lldb] Merge TestSBCommandReturnObject tests In #125132, Michael pointed out that there are now two tests with the same name: ./lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py ./lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py (cherry picked from commit 472220077383b2dbd9cfcaffcc6030558ba7a744) --- .../TestSBCommandReturnObject.py | 9 +++++++++ .../TestSBCommandReturnObject.py | 17 ----------------- 2 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py diff --git a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py index f2dbbbd7b4d42..2193b7270d0b4 100644 --- a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py +++ b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py @@ -24,3 +24,12 @@ def test_sb_command_return_object(self): # return exit code 0 to indicate success. We can let this exception go # - the test harness will recognize it as a test failure. subprocess.check_call([self.driver_exe, self.driver_exe]) + + def test_get_command(self): + res = lldb.SBCommandReturnObject() + self.assertEqual(res.GetCommand(), "") + + ci = self.dbg.GetCommandInterpreter() + ci.HandleCommand("help help", res) + self.assertTrue(res.Succeeded()) + self.assertEqual(res.GetCommand(), "help help") diff --git a/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py b/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py deleted file mode 100644 index b0d0b7a8dfe4e..0000000000000 --- a/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py +++ /dev/null @@ -1,17 +0,0 @@ -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class SBCommandReturnObjectTest(TestBase): - NO_DEBUG_INFO_TESTCASE = True - - def test(self): - res = lldb.SBCommandReturnObject() - self.assertEqual(res.GetCommand(), "") - - ci = self.dbg.GetCommandInterpreter() - ci.HandleCommand("help help", res) - self.assertTrue(res.Succeeded()) - self.assertEqual(res.GetCommand(), "help help")