[Lldb-commits] [lldb] r129470 - /lldb/trunk/test/dotest.py
Jim Ingham
jingham at apple.com
Wed Apr 13 14:11:41 PDT 2011
Author: jingham
Date: Wed Apr 13 16:11:41 2011
New Revision: 129470
URL: http://llvm.org/viewvc/llvm-project?rev=129470&view=rev
Log:
Have "-h" print just the command arguments, and "-h -v" print the examples as well.
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=129470&r1=129469&r2=129470&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Apr 13 16:11:41 2011
@@ -146,7 +146,7 @@
print """
Usage: dotest.py [option] [args]
where options:
--h : print this help message and exit (also --help)
+-h : print this help message and exit. Add '-v' for more detailed help.
-A : specify the architecture(s) to launch for the inferior process
-A i386 => launch inferior with i386 architecture
-A x86_64^i386 => launch inferior with x86_64 and i386 architectures
@@ -190,7 +190,10 @@
args : specify a list of directory names to search for test modules named after
Test*.py (test discovery)
if empty, search from the curret working directory, instead
+"""
+ if verbose > 0:
+ print """
Examples:
This is an example of using the -f option to pinpoint to a specfic test class
@@ -299,6 +302,8 @@
global verbose
global testdirs
+ do_help = False
+
if len(sys.argv) == 1:
return
@@ -313,7 +318,8 @@
break
if sys.argv[index].find('-h') != -1:
- usage()
+ index += 1
+ do_help = True
elif sys.argv[index].startswith('-A'):
# Increment by 1 to fetch the ARCH spec.
index += 1
@@ -434,6 +440,9 @@
print "Unknown option: ", sys.argv[index]
usage()
+ if do_help == True:
+ usage()
+
# Do not specify both '-a' and '+a' at the same time.
if dont_do_python_api_test and just_do_python_api_test:
usage()
More information about the lldb-commits
mailing list