[Lldb-commits] [lldb] r166740 - /lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py

Filipe Cabecinhas me at filcab.net
Thu Oct 25 16:52:28 PDT 2012


Author: filcab
Date: Thu Oct 25 18:52:28 2012
New Revision: 166740

URL: http://llvm.org/viewvc/llvm-project?rev=166740&view=rev
Log:
Add a teardown function to TestAbbreviations so it doesn't error out when running for two archs.

Modified:
    lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py

Modified: lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py?rev=166740&r1=166739&r2=166740&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py (original)
+++ lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py Thu Oct 25 18:52:28 2012
@@ -9,7 +9,7 @@
 import lldbutil
 
 class AbbreviationsTestCase(TestBase):
-    
+
     mydir = os.path.join("functionalities", "abbreviation")
 
     def test_nonrunning_command_abbreviations (self):
@@ -35,6 +35,11 @@
         self.expect("h",
                     startstr = "The following is a list of built-in, permanent debugger commands:")
 
+        # Execute cleanup function during test tear down
+        def cleanup():
+            self.runCmd("command alias t thread select")
+        self.addTearDownHook(cleanup)
+
         # Several matching commands: list them and error out.
         self.runCmd("command unalias t")
         self.expect("t",
@@ -136,7 +141,7 @@
                                  "thread #1:",
                                  "a.out",
                                  "sum\(a=1238, b=78392\)",
-                                 "at main.cpp\:25", 
+                                 "at main.cpp\:25",
                                  "stop reason = breakpoint 2.1" ])
 
         # ARCH, if not specified, defaults to x86_64.
@@ -147,7 +152,7 @@
                                    ' mov',
                                    ' addl ',
                                    'ret'],
-                        patterns = ['(leave|popq|popl)'])                               
+                        patterns = ['(leave|popq|popl)'])
 
         self.expect("i d l main.cpp",
                     patterns = ["Line table for .*main.cpp in `a.out"])





More information about the lldb-commits mailing list