forked from OSchip/llvm-project
dotest.py - fixed a bug displaying usage
./dotest.py --help llvm-svn: 238043
This commit is contained in:
parent
279a2b7575
commit
8994fedc2b
|
@ -233,7 +233,10 @@ Run lldb test suite using a separate process for each test file.
|
|||
|
||||
is_posix = (os.name == "posix")
|
||||
dotest_argv = shlex.split(dotest_option_string, posix=is_posix) if dotest_option_string else []
|
||||
dotest_options = dotest_args.getArguments(dotest_argv)
|
||||
|
||||
parser = dotest_args.create_parser()
|
||||
dotest_options = dotest_args.parse_args(parser, dotest_argv)
|
||||
|
||||
if not dotest_options.s:
|
||||
# no session log directory, we need to add this to prevent
|
||||
# every dotest invocation from creating its own directory
|
||||
|
|
|
@ -491,7 +491,8 @@ def parseOptionsAndInitTestdirs():
|
|||
platform_system = platform.system()
|
||||
platform_machine = platform.machine()
|
||||
|
||||
args = dotest_args.getArguments(sys.argv[1:])
|
||||
parser = dotest_args.create_parser()
|
||||
args = dotest_args.parse_args(parser, sys.argv[1:])
|
||||
|
||||
if args.unset_env_varnames:
|
||||
for env_var in args.unset_env_varnames:
|
||||
|
|
|
@ -26,8 +26,7 @@ def parse_args(parser, argv):
|
|||
else:
|
||||
return parser.parse_args(args=argv)
|
||||
|
||||
def getArguments(argv):
|
||||
|
||||
def create_parser():
|
||||
parser = argparse.ArgumentParser(description='description', prefix_chars='+-', add_help=False)
|
||||
group = None
|
||||
|
||||
|
@ -114,4 +113,4 @@ def getArguments(argv):
|
|||
group = parser.add_argument_group('Test directories')
|
||||
group.add_argument('args', metavar='test-dir', nargs='*', help='Specify a list of directory names to search for test modules named after Test*.py (test discovery). If empty, search from the current working directory instead.')
|
||||
|
||||
return parse_args(parser, argv)
|
||||
return parser
|
||||
|
|
Loading…
Reference in New Issue