[Lldb-commits] [lldb] a32f8dd - [lldb/test] Skip editline tests when LLDB_ENABLE_LIBEDIT is off.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 21:04:33 PST 2019


Author: Jonas Devlieghere
Date: 2019-12-20T21:01:23-08:00
New Revision: a32f8dd195866c2be95d7e71f311a805a6fed4cd

URL: https://github.com/llvm/llvm-project/commit/a32f8dd195866c2be95d7e71f311a805a6fed4cd
DIFF: https://github.com/llvm/llvm-project/commit/a32f8dd195866c2be95d7e71f311a805a6fed4cd.diff

LOG: [lldb/test] Skip editline tests when LLDB_ENABLE_LIBEDIT is off.

Add a new decorator that checks if LLDB was build with editline support
and mark the relevant tests as skipped when that's not the case.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
    lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
    lldb/packages/Python/lldbsuite/test/decorators.py
    lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
    lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
index 1275595a7931..9b2b71230e52 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
@@ -15,6 +15,7 @@ class MultilineCompletionTest(PExpectTest):
     # under ASAN on a loaded machine..
     @skipIfAsan
     @skipIfRemote  # test is written to explicitly "run" the binary
+    @skipIfEditlineSupportMissing
     def test_basic_completion(self):
         """Test that we can complete a simple multiline expression"""
         self.build()

diff  --git a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
index 712111209215..743e79945364 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
@@ -17,6 +17,7 @@ class TestCase(PExpectTest):
     # PExpect uses many timeouts internally and doesn't play well
     # under ASAN on a loaded machine..
     @skipIfAsan
+    @skipIfEditlineSupportMissing
     def test_nav_arrow_up(self):
         """Tests that we can navigate back to the previous line with the up arrow"""
         self.launch()
@@ -38,6 +39,7 @@ def test_nav_arrow_up(self):
         self.quit()
 
     @skipIfAsan
+    @skipIfEditlineSupportMissing
     def test_nav_arrow_down(self):
         """Tests that we can navigate to the next line with the down arrow"""
         self.launch()

diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 7009767f63a6..ec17cb7c2569 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -808,6 +808,9 @@ def skipIfCursesSupportMissing(func):
 def skipIfXmlSupportMissing(func):
     return _get_bool_config_skip_if_decorator("xml")(func)
 
+def skipIfEditlineSupportMissing(func):
+    return _get_bool_config_skip_if_decorator("editline")(func)
+
 def skipIfLLVMTargetMissing(target):
     config = lldb.SBDebugger.GetBuildConfiguration()
     targets = config.GetValueForKey("targets").GetValueForKey("value")

diff  --git a/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py b/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
index b48585146374..610bf019436a 100644
--- a/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
+++ b/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
@@ -16,6 +16,7 @@ class IOHandlerCompletionTest(PExpectTest):
     # PExpect uses many timeouts internally and doesn't play well
     # under ASAN on a loaded machine..
     @skipIfAsan
+    @skipIfEditlineSupportMissing
     def test_completion(self):
         self.launch(dimensions=(100,500))
 

diff  --git a/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py b/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
index cf82f5d8ab1e..8e1652a50416 100644
--- a/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
+++ b/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
@@ -16,6 +16,7 @@ class EditlineTest(PExpectTest):
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfAsan
+    @skipIfEditlineSupportMissing
     def test_left_right_arrow(self):
         """Test that ctrl+left/right arrow navigates words correctly.
 


        


More information about the lldb-commits mailing list