[Lldb-commits] [lldb] 66ae40e - [lldb][test] Remove not_remote_testsuite_ready in favor of skipIfRemote decorator

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 11 00:15:24 PST 2020


Author: Raphael Isemann
Date: 2020-11-11T09:14:54+01:00
New Revision: 66ae40ebfb83c8beb2080123d3866bd08520fcef

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

LOG: [lldb][test] Remove not_remote_testsuite_ready in favor of skipIfRemote decorator

Those two decorators have identical behaviour. This removes
`not_remote_testsuite_ready` as `skipIfRemote` seems more consistent with the
other decorator names we have

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D89376

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/decorators.py
    lldb/test/API/commands/process/launch/TestProcessLaunch.py
    lldb/test/API/functionalities/load_unload/TestLoadUnload.py
    lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
    lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
    lldb/test/API/python_api/target/TestTargetAPI.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 4dfc7b108ff3..07b1d15810ab 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -390,13 +390,6 @@ def should_skip_llgs_tests():
     return skipTestIfFn(should_skip_llgs_tests)(func)
 
 
-def not_remote_testsuite_ready(func):
-    """Decorate the item as a test which is not ready yet for remote testsuite."""
-    def is_remote():
-        return "Not ready for remote testsuite" if lldb.remote_platform else None
-    return skipTestIfFn(is_remote)(func)
-
-
 def expectedFailureOS(
         oslist,
         bugnumber=None,

diff  --git a/lldb/test/API/commands/process/launch/TestProcessLaunch.py b/lldb/test/API/commands/process/launch/TestProcessLaunch.py
index 83bc25d3c9f9..7a1a9a146999 100644
--- a/lldb/test/API/commands/process/launch/TestProcessLaunch.py
+++ b/lldb/test/API/commands/process/launch/TestProcessLaunch.py
@@ -28,7 +28,7 @@ def tearDown(self):
         self.runCmd("settings clear auto-confirm")
         TestBase.tearDown(self)
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipIfReproducer
     def test_io(self):
         """Test that process launch I/O redirection flags work properly."""
@@ -82,7 +82,7 @@ def test_io(self):
     # rdar://problem/9056462
     # The process launch flag '-w' for setting the current working directory
     # not working?
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @expectedFailureAll(oslist=["freebsd", "linux"], bugnumber="llvm.org/pr20265")
     @expectedFailureNetBSD
     @skipIfReproducer
@@ -112,7 +112,7 @@ def test_set_working_dir_nonexisting(self):
                 "error:.* No such file or directory: %s" %
                 invalid_dir_path])
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipIfReproducer
     def test_set_working_dir_existing(self):
         """Test that '-w dir' sets the working dir when running the inferior."""

diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index 05dffc0df734..913265549c81 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -91,7 +91,7 @@ def setSvr4Support(self, enabled):
     # libloadunload_d.so does not appear in the image list because executable
     # dependencies are resolved relative to the debuggers PWD. Bug?
     @expectedFailureAll(oslist=["freebsd", "linux", "netbsd"])
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work 
diff erently
     @skipIfReproducer # VFS is a snapshot.
     def test_modules_search_paths(self):

diff  --git a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
index 0ec117222b95..b54435e7338e 100644
--- a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
+++ b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
@@ -36,7 +36,7 @@ def setUp(self):
         self.hidden_dir = os.path.join(self.wd, 'hidden')
         self.hidden_lib = os.path.join(self.hidden_dir, self.lib_name)
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work 
diff erently
     @expectedFlakeyNetBSD
     @expectedFailureAll(oslist=["linux"], archs=['arm'], bugnumber="llvm.org/pr45894")

diff  --git a/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py b/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
index d561af02d307..3812b197a32e 100644
--- a/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
+++ b/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
@@ -14,7 +14,7 @@ class ProcessSaveCoreTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipUnlessWindows
     def test_cannot_save_core_unless_process_stopped(self):
         """Test that SaveCore fails if the process isn't stopped."""
@@ -28,7 +28,7 @@ def test_cannot_save_core_unless_process_stopped(self):
         error = process.SaveCore(core)
         self.assertTrue(error.Fail())
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @skipUnlessWindows
     def test_save_windows_mini_dump(self):
         """Test that we can save a Windows mini dump."""

diff  --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py
index 0f5fe80177e6..f058a0a732c2 100644
--- a/lldb/test/API/python_api/target/TestTargetAPI.py
+++ b/lldb/test/API/python_api/target/TestTargetAPI.py
@@ -333,7 +333,7 @@ def get_description(self):
         self.expect(desc, exe=False,
                     substrs=['Target', 'Module', 'a.out', 'Breakpoint'])
 
-    @not_remote_testsuite_ready
+    @skipIfRemote
     @add_test_categories(['pyapi'])
     @no_debug_info_test
     @skipIfReproducer # Inferior doesn't run during replay.


        


More information about the lldb-commits mailing list