Fixed up intermittently failing tests to skip on Linux.
Also added 'import sys' on some tests that are using non-standard
unittest2.skipUnless blocks with code that is intended to do things
that we have more specializes @* attributes for. These skip
conditions were failing to execute due to missing import, causing
darwin-only tests to run on Linux regardless. Will file a bug for
that separately.
llvm-svn: 204747
diff --git a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
index 0eb1b3c..8749738 100644
--- a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
+++ b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
@@ -27,6 +27,7 @@
self.call_function()
@dwarf_test
+ @skipIfLinux # llvm.org/pr19246: intermittent failure
def test_with_dwarf(self):
"""Test calling std::String member function."""
self.buildDwarf()
diff --git a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index ddc30db..d10eab8 100644
--- a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -3,6 +3,7 @@
import os, time
import unittest2
import lldb, lldbutil
+import sys
from lldbtest import *
class CrashingRecursiveInferiorTestCase(TestBase):
@@ -66,6 +67,7 @@
self.recursive_inferior_crashing_step_after_break()
@skipIfFreeBSD # llvm.org/pr16684
+ @expectedFailureLinux('llvm.org/pr16684')
def test_recursive_inferior_crashing_step_after_break_dwarf(self):
"""Test that lldb functions correctly after stepping through a crash."""
self.buildDwarf()
@@ -78,7 +80,7 @@
self.recursive_inferior_crashing_expr_step_expr()
@expectedFailureFreeBSD('llvm.org/pr15989') # Couldn't allocate space for the stack frame
- @expectedFailureLinux # llvm.org/pr15989 - Couldn't allocate space for the stack frame
+ @expectedFailureLinux('llvm.org/pr15989') # Couldn't allocate space for the stack frame
def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self):
"""Test that lldb expressions work before and after stepping after a crash."""
self.buildDwarf()
diff --git a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
index c3521a3..22f186e 100644
--- a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -6,6 +6,7 @@
import re
import unittest2
import lldb, lldbutil
+import sys
from lldbtest import *
class ReturnValueTestCase(TestBase):
@@ -40,6 +41,7 @@
@python_api_test
@dwarf_test
+ @skipIfLinux # intermittent failure - llvm.org/pr19247
def test_step_over_with_dwarf_python(self):
"""Test stepping over using avoid-no-debug with dwarf."""
self.buildDwarf()
@@ -57,6 +59,7 @@
@python_api_test
@dwarf_test
+ @skipIfLinux # intermittent failure - llvm.org/pr19247
def test_step_in_with_dwarf_python(self):
"""Test stepping in using avoid-no-debug with dwarf."""
self.buildDwarf()
diff --git a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
index e74c37f..1fc8e59 100644
--- a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
+++ b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
@@ -4,6 +4,7 @@
import unittest2
import lldb
import pexpect
+import sys
from lldbtest import *
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")