summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-04-13 21:11:41 +0000
committerJim Ingham <jingham@apple.com>2011-04-13 21:11:41 +0000
commit5d3e8229265459a664e176edde2c76a8bc6fdfc1 (patch)
treeb032574c5c8abbafb26bf304b1a9b6a6a331a8b3
parentffa6378fd6a0ed50fd691fbca67e39d6d17b0fd7 (diff)
downloadbcm5719-llvm-5d3e8229265459a664e176edde2c76a8bc6fdfc1.tar.gz
bcm5719-llvm-5d3e8229265459a664e176edde2c76a8bc6fdfc1.zip
Have "-h" print just the command arguments, and "-h -v" print the examples as well.
llvm-svn: 129470
-rwxr-xr-xlldb/test/dotest.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py
index ecb4b722286..374fc8ad490 100755
--- a/lldb/test/dotest.py
+++ b/lldb/test/dotest.py
@@ -146,7 +146,7 @@ def usage():
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 @@ and:
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 @@ def parseOptionsAndInitTestdirs():
global verbose
global testdirs
+ do_help = False
+
if len(sys.argv) == 1:
return
@@ -313,7 +318,8 @@ def parseOptionsAndInitTestdirs():
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 @@ def parseOptionsAndInitTestdirs():
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()
OpenPOWER on IntegriCloud