[Lldb-commits] [lldb] r112547 - in /lldb/trunk/test: array_types/TestArrayTypes.py lldbtest.py

Johnny Chen johnny.chen at apple.com
Mon Aug 30 16:08:53 PDT 2010


Author: johnny
Date: Mon Aug 30 18:08:52 2010
New Revision: 112547

URL: http://llvm.org/viewvc/llvm-project?rev=112547&view=rev
Log:
Converted TestArrayTypes.py to Dsym/Dwarf combination, and added verbose output
of os command to lldbtest.TestBase.system() method.

Modified:
    lldb/trunk/test/array_types/TestArrayTypes.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/TestArrayTypes.py?rev=112547&r1=112546&r2=112547&view=diff
==============================================================================
--- lldb/trunk/test/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/array_types/TestArrayTypes.py Mon Aug 30 18:08:52 2010
@@ -9,7 +9,25 @@
 
     mydir = "array_types"
 
-    def test_array_types(self):
+    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+    def test_with_dsym_and_run_command(self):
+        self.buildDsym()
+        self.array_types()
+
+    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+    def test_with_dsym_and_python_api(self):
+        self.buildDsym()
+        self.array_types_python()
+
+    def test_with_dwarf_and_run_command(self):
+        self.buildDwarf()
+        self.array_types()
+
+    def test_with_dwarf_and_python_api(self):
+        self.buildDwarf()
+        self.array_types_python()
+
+    def array_types(self):
         """Test 'variable list var_name' on some variables with array types."""
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -52,7 +70,7 @@
         self.expect("variable list long_6", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = '(long [6])')
 
-    def test_array_types_python(self):
+    def array_types_python(self):
         """Use Python APIs to inspect variables with array types."""
         exe = os.path.join(os.getcwd(), "a.out")
 

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=112547&r1=112546&r2=112547&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Aug 30 18:08:52 2010
@@ -108,6 +108,7 @@
 import os, sys
 from subprocess import *
 import time
+import types
 import unittest2
 import lldb
 
@@ -392,7 +393,12 @@
         retcode = process.poll()
 
         if self.traceAlways:
+            if isinstance(popenargs, types.StringTypes):
+                args = [popenargs]
+            else:
+                args = list(popenargs)
             print >> sys.stderr
+            print >> sys.stderr, "os command:", args
             print >> sys.stderr, "output:", output
             print >> sys.stderr, "error:", unused_err
             print >> sys.stderr, "retcode:", retcode





More information about the lldb-commits mailing list