def skipIfRemote(func):
"""Decorate the item to skip tests if testing remotely."""
- def is_remote():
- return "skip on remote platform" if lldb.remote_platform else None
- return skipTestIfFn(is_remote)(func)
+ return unittest2.skipIf(lldb.remote_platform, "skip on remote platform")(func)
def skipIfNoSBHeaders(func):
import lldb
from .lldbtest import *
from . import lldbutil
+from lldbsuite.test.decorators import *
if sys.platform.startswith('win32'):
# llvm.org/pr22274: need a pexpect replacement for windows
else:
import pexpect
+ @skipIfRemote
class PExpectTest(TestBase):
NO_DEBUG_INFO_TESTCASE = True
# PExpect uses many timeouts internally and doesn't play well
# 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"""
mydir = TestBase.compute_mydir(__file__)
source = 'main.c'
- @skipIfRemote # test not remote-ready llvm.org/pr24813
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_run_crash(self):
"""Test that the lldb driver's batch mode works correctly."""
self.expect_prompt()
self.expect("frame variable touch_me_not", substrs='(char *) touch_me_not')
- @skipIfRemote # test not remote-ready llvm.org/pr24813
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_run_exit(self):
"""Test that the lldb driver's batch mode works correctly."""
import pexpect
child.expect(pexpect.EOF)
- @skipIfRemote
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_launch_stop_at_entry(self):
"""Test that the lldb driver's batch mode works correctly for process launch."""
child.expect_exact("continue")
# The App should have not have crashed:
child.expect_exact("Got there on time and it did not crash.")
-
+
# Then lldb should exit.
child.expect_exact("exited")
import pexpect
self.victim.close()
self.victim = None
- @skipIfRemote # test not remote-ready llvm.org/pr24813
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
@expectedFailureNetBSD
def test_batch_mode_attach_exit(self):