[Lldb-commits] [lldb] r137348 - /lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py

Johnny Chen johnny.chen at apple.com
Thu Aug 11 13:51:45 PDT 2011


Author: johnny
Date: Thu Aug 11 15:51:45 2011
New Revision: 137348

URL: http://llvm.org/viewvc/llvm-project?rev=137348&view=rev
Log:
Fix the expect patterns to work for both OSX SnowLeopard and Lion.
On Lion, printf is defined in libsystem_c.dylib.

Modified:
    lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py

Modified: lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py?rev=137348&r1=137347&r2=137348&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py (original)
+++ lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py Thu Aug 11 15:51:45 2011
@@ -84,8 +84,13 @@
         self.expect("expr string_not_empty",
                     substrs = ['(int (*)(const char *)) $0 = ', '(a.out`'])
 
+        if sys.platform.startswith("darwin"):
+            regexps = ['lib.*\.dylib`printf']
+        else:
+            regexps = ['printf']
         self.expect("expr (int (*)(const char*, ...))printf",
-                    substrs = ['(int (*)(const char *, ...)) $1 = ', '(libSystem.'])
+                    substrs = ['(int (*)(const char *, ...)) $1 = '],
+                    patterns = regexps)
 
         self.expect("expr $1(\"Hello world\\n\")",
                     startstr = '(int) $2 = 12')





More information about the lldb-commits mailing list