[Lldb-commits] [lldb] r183812 - Update TestRegisters for running on Linux (filed llvm.org/pr16301)
Daniel Malea
daniel.malea at intel.com
Tue Jun 11 17:13:43 PDT 2013
Author: dmalea
Date: Tue Jun 11 19:13:43 2013
New Revision: 183812
URL: http://llvm.org/viewvc/llvm-project?rev=183812&view=rev
Log:
Update TestRegisters for running on Linux (filed llvm.org/pr16301)
- skip the attach cases in TestRegisters.py -- caused slowness/sigabrt
- fixed log file removal function (in case test is run with -# flag)
Modified:
lldb/trunk/test/functionalities/register/TestRegisters.py
Modified: lldb/trunk/test/functionalities/register/TestRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/register/TestRegisters.py?rev=183812&r1=183811&r2=183812&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/register/TestRegisters.py (original)
+++ lldb/trunk/test/functionalities/register/TestRegisters.py Tue Jun 11 19:13:43 2013
@@ -45,6 +45,7 @@ class RegisterCommandsTestCase(TestBase)
self.buildDefault()
self.convenience_registers()
+ @skipIfLinux # llvm.org/pr16301 LLDB occasionally exits with SIGABRT
def test_convenience_registers_with_process_attach(self):
"""Test convenience registers after a 'process attach'."""
if not self.getArchitecture() in ['x86_64']:
@@ -53,6 +54,7 @@ class RegisterCommandsTestCase(TestBase)
self.convenience_registers_with_process_attach(test_16bit_regs=False)
@expectedFailureLinux("llvm.org/pr14600") # Linux doesn't support 16-bit convenience registers
+ @skipIfLinux # llvm.org/pr16301 LLDB occasionally exits with SIGABRT
def test_convenience_registers_16bit_with_process_attach(self):
"""Test convenience registers after a 'process attach'."""
if not self.getArchitecture() in ['x86_64']:
@@ -74,6 +76,11 @@ class RegisterCommandsTestCase(TestBase)
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped', 'stop reason = breakpoint'])
+ def remove_log(self):
+ """ Remove the temporary log file generated by some tests."""
+ if os.path.exists(self.log_file):
+ os.remove(self.log_file)
+
# platform specific logging of the specified category
def log_enable(self, category):
self.platform = ""
@@ -83,11 +90,11 @@ class RegisterCommandsTestCase(TestBase)
self.platform = "linux"
if self.platform != "":
- log_file = os.path.join(os.getcwd(), 'TestRegisters.log')
- self.runCmd("log enable " + self.platform + " " + str(category) + " registers -v -f " + log_file, RUN_SUCCEEDED)
+ self.log_file = os.path.join(os.getcwd(), 'TestRegisters.log')
+ self.runCmd("log enable " + self.platform + " " + str(category) + " registers -v -f " + self.log_file, RUN_SUCCEEDED)
if not self.has_teardown:
self.has_teardown = True
- self.addTearDownHook(lambda: os.remove(log_file))
+ self.addTearDownHook(self.remove_log)
def register_commands(self):
"""Test commands related to registers, in particular vector registers."""
More information about the lldb-commits
mailing list