[Lldb-commits] [lldb] r124303 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Wed Jan 26 11:07:42 PST 2011


Author: johnny
Date: Wed Jan 26 13:07:42 2011
New Revision: 124303

URL: http://llvm.org/viewvc/llvm-project?rev=124303&view=rev
Log:
Add "-A arch_spec" and "-C compiler_spec" options to the test driver.  Example:

$ ./dotest.py -A i386 -C clang -v -w -t -p TestObjCMethods.py
$ ./dotest.py -A x86_64 -C gcc -v -w types

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=124303&r1=124302&r2=124303&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Jan 26 13:07:42 2011
@@ -121,6 +121,8 @@
 Usage: dotest.py [option] [args]
 where options:
 -h   : print this help message and exit (also --help)
+-A   : specify the architecture to launch for the inferior process
+-C   : specify the compiler used to build the inferior executable
 -a   : don't do lldb Python API tests
        use @python_api_test to decorate a test case as lldb Python API test
 +a   : just do lldb Python API tests
@@ -276,6 +278,20 @@
 
         if sys.argv[index].find('-h') != -1:
             usage()
+        elif sys.argv[index].startswith('-A'):
+            # Increment by 1 to fetch the ARCH spec.
+            index += 1
+            if index >= len(sys.argv) or sys.argv[index].startswith('-'):
+                usage()
+            os.environ["ARCH"] = sys.argv[index]
+            index += 1
+        elif sys.argv[index].startswith('-C'):
+            # Increment by 1 to fetch the CC spec.
+            index += 1
+            if index >= len(sys.argv) or sys.argv[index].startswith('-'):
+                usage()
+            os.environ["CC"] = sys.argv[index]
+            index += 1
         elif sys.argv[index].startswith('-a'):
             dont_do_python_api_test = True
             index += 1





More information about the lldb-commits mailing list