From 096925233b16953edc342a01685a51d040b96cac Mon Sep 17 00:00:00 2001 From: Daniel Malea Date: Tue, 20 Nov 2012 18:53:21 +0000 Subject: [PATCH] Use auto-confirm setting to avoid prompts causing some tests to appear to hang - this commit addresses bugzilla #14385 llvm-svn: 168375 --- .../breakpoint_command/TestBreakpointCommand.py | 3 ++- lldb/test/types/TestFloatTypes.py | 8 ++++++-- lldb/test/types/TestFloatTypesExpr.py | 8 ++++++-- lldb/test/types/TestIntegerTypes.py | 16 ++++++---------- lldb/test/types/TestIntegerTypesExpr.py | 16 ++++++---------- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index bda402d..2ecdfc3 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -26,7 +26,6 @@ class BreakpointCommandTestCase(TestBase): self.breakpoint_command_sequence() self.breakpoint_command_script_parameters () - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_with_dwarf(self): """Test a sequence of breakpoint command add, list, and delete.""" @@ -39,6 +38,8 @@ class BreakpointCommandTestCase(TestBase): TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.') + # disable "There is a running process, kill it and restart?" prompt + self.runCmd("settings set auto-confirm true") def breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" diff --git a/lldb/test/types/TestFloatTypes.py b/lldb/test/types/TestFloatTypes.py index 0d7840a..69740c3 100644 --- a/lldb/test/types/TestFloatTypes.py +++ b/lldb/test/types/TestFloatTypes.py @@ -12,6 +12,12 @@ class FloatTypesTestCase(AbstractBase.GenericTester): mydir = "types" + def setUp(self): + # Call super's setUp(). + AbstractBase.GenericTester.setUp(self) + # disable "There is a running process, kill it and restart?" prompt + self.runCmd("settings set auto-confirm true") + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @dsym_test def test_float_type_with_dsym(self): @@ -24,7 +30,6 @@ class FloatTypesTestCase(AbstractBase.GenericTester): """Test that float-type variables are displayed correctly from a block.""" self.build_and_run('float.cpp', set(['float']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_float_type_with_dwarf(self): """Test that float-type variables are displayed correctly.""" @@ -42,7 +47,6 @@ class FloatTypesTestCase(AbstractBase.GenericTester): """Test that double-type variables are displayed correctly from a block.""" self.build_and_run('double.cpp', set(['double']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_double_type_with_dwarf(self): """Test that double-type variables are displayed correctly.""" diff --git a/lldb/test/types/TestFloatTypesExpr.py b/lldb/test/types/TestFloatTypesExpr.py index 8472227..8cbf5f6 100644 --- a/lldb/test/types/TestFloatTypesExpr.py +++ b/lldb/test/types/TestFloatTypesExpr.py @@ -15,6 +15,12 @@ class FloatTypesExprTestCase(AbstractBase.GenericTester): # rdar://problem/8493023 # test/types failures for Test*TypesExpr.py: element offset computed wrong and sign error? + def setUp(self): + # Call super's setUp(). + AbstractBase.GenericTester.setUp(self) + # disable "There is a running process, kill it and restart?" prompt + self.runCmd("settings set auto-confirm true") + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @dsym_test def test_float_type_with_dsym(self): @@ -27,7 +33,6 @@ class FloatTypesExprTestCase(AbstractBase.GenericTester): """Test that float-type variables are displayed correctly from a block.""" self.build_and_run_expr('float.cpp', set(['float']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_float_type_with_dwarf(self): """Test that float-type variable expressions are evaluated correctly.""" @@ -45,7 +50,6 @@ class FloatTypesExprTestCase(AbstractBase.GenericTester): """Test that double-type variables are displayed correctly from a block.""" self.build_and_run_expr('double.cpp', set(['double']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_double_type_with_dwarf(self): """Test that double-type variable expressions are evaluated correctly.""" diff --git a/lldb/test/types/TestIntegerTypes.py b/lldb/test/types/TestIntegerTypes.py index 38f30ca..453f8bd 100644 --- a/lldb/test/types/TestIntegerTypes.py +++ b/lldb/test/types/TestIntegerTypes.py @@ -12,6 +12,12 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): mydir = "types" + def setUp(self): + # Call super's setUp(). + AbstractBase.GenericTester.setUp(self) + # disable "There is a running process, kill it and restart?" prompt + self.runCmd("settings set auto-confirm true") + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @dsym_test def test_char_type_with_dsym(self): @@ -24,7 +30,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that char-type variables are displayed correctly from a block.""" self.build_and_run('char.cpp', set(['char']), bc=True, qd=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_char_type_with_dwarf(self): """Test that char-type variables are displayed correctly.""" @@ -42,7 +47,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'unsigned char'-type variables are displayed correctly from a block.""" self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_char_type_with_dwarf(self): """Test that 'unsigned char'-type variables are displayed correctly.""" @@ -60,7 +64,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that short-type variables are displayed correctly from a block.""" self.build_and_run('short.cpp', set(['short']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_short_type_with_dwarf(self): """Test that short-type variables are displayed correctly.""" @@ -78,7 +81,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'unsigned short'-type variables are displayed correctly from a block.""" self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_short_type_with_dwarf(self): """Test that 'unsigned short'-type variables are displayed correctly.""" @@ -96,7 +98,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that int-type variables are displayed correctly from a block.""" self.build_and_run('int.cpp', set(['int']), dsym=False) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_int_type_with_dwarf(self): """Test that int-type variables are displayed correctly.""" @@ -114,7 +115,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'unsigned int'-type variables are displayed correctly from a block.""" self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_int_type_with_dwarf(self): """Test that 'unsigned int'-type variables are displayed correctly.""" @@ -132,7 +132,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that long-type variables are displayed correctly from a block.""" self.build_and_run('long.cpp', set(['long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_long_type_with_dwarf(self): """Test that long-type variables are displayed correctly.""" @@ -150,7 +149,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'unsigned_long'-type variables are displayed correctly from a block.""" self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_long_type_with_dwarf(self): """Test that 'unsigned long'-type variables are displayed correctly.""" @@ -171,7 +169,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'long_long'-type variables are displayed correctly from a block.""" self.build_and_run('long_long.cpp', set(['long long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_long_long_type_with_dwarf(self): """Test that 'long long'-type variables are displayed correctly.""" @@ -189,7 +186,6 @@ class IntegerTypesTestCase(AbstractBase.GenericTester): """Test that 'unsigned_long_long'-type variables are displayed correctly from a block.""" self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_long_long_type_with_dwarf(self): """Test that 'unsigned long long'-type variables are displayed correctly.""" diff --git a/lldb/test/types/TestIntegerTypesExpr.py b/lldb/test/types/TestIntegerTypesExpr.py index a316526..03daa90 100644 --- a/lldb/test/types/TestIntegerTypesExpr.py +++ b/lldb/test/types/TestIntegerTypesExpr.py @@ -12,6 +12,12 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): mydir = "types" + def setUp(self): + # Call super's setUp(). + AbstractBase.GenericTester.setUp(self) + # disable "There is a running process, kill it and restart?" prompt + self.runCmd("settings set auto-confirm true") + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @dsym_test def test_char_type_with_dsym(self): @@ -24,7 +30,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that char-type variables are displayed correctly from a block.""" self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_char_type_with_dwarf(self): """Test that char-type variable expressions are evaluated correctly.""" @@ -42,7 +47,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'unsigned char'-type variables are displayed correctly from a block.""" self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_char_type_with_dwarf(self): """Test that 'unsigned char'-type variable expressions are evaluated correctly.""" @@ -60,7 +64,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that short-type variables are displayed correctly from a block.""" self.build_and_run_expr('short.cpp', set(['short']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_short_type_with_dwarf(self): """Test that short-type variable expressions are evaluated correctly.""" @@ -78,7 +81,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'unsigned short'-type variables are displayed correctly from a block.""" self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_short_type_with_dwarf(self): """Test that 'unsigned short'-type variable expressions are evaluated correctly.""" @@ -96,7 +98,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that int-type variables are displayed correctly from a block.""" self.build_and_run_expr('int.cpp', set(['int']), dsym=False) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_int_type_with_dwarf(self): """Test that int-type variable expressions are evaluated correctly.""" @@ -114,7 +115,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'unsigned int'-type variables are displayed correctly from a block.""" self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_int_type_with_dwarf(self): """Test that 'unsigned int'-type variable expressions are evaluated correctly.""" @@ -132,7 +132,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that long-type variables are displayed correctly from a block.""" self.build_and_run_expr('long.cpp', set(['long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_long_type_with_dwarf(self): """Test that long-type variable expressions are evaluated correctly.""" @@ -150,7 +149,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'unsigned_long'-type variables are displayed correctly from a block.""" self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_long_type_with_dwarf(self): """Test that 'unsigned long'-type variable expressions are evaluated correctly.""" @@ -171,7 +169,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'long_long'-type variables are displayed correctly from a block.""" self.build_and_run_expr('long_long.cpp', set(['long long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_long_long_type_with_dwarf(self): """Test that 'long long'-type variable expressions are evaluated correctly.""" @@ -189,7 +186,6 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester): """Test that 'unsigned_long_long'-type variables are displayed correctly from a block.""" self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True) - @unittest2.skipIf(sys.platform.startswith("linux"), "Hanging on Linux: bugzilla #14385") @dwarf_test def test_unsigned_long_long_type_with_dwarf(self): """Test that 'unsigned long long'-type variable expressions are evaluated correctly.""" -- 2.7.4