[dotest] Print invocation when encountering an error.

With this patch dotest.py will print the full invocation whenever it
fails to parse its arguments. The dotest invocation is usually build up
with different inputs, potentially coming from CMake, lldb-dotest, lit
or passed directly. This can make debugging hard, especially on CI,
where there might be another layer of indirection. This aims to make
that a bit easier.

llvm-svn: 369922
This commit is contained in:
Jonas Devlieghere 2019-08-26 16:08:53 +00:00
parent 3877aa1660
commit a69992c8cb
1 changed files with 6 additions and 2 deletions

View File

@ -225,8 +225,12 @@ def parseOptionsAndInitTestdirs():
platform_system = platform.system()
platform_machine = platform.machine()
parser = dotest_args.create_parser()
args = dotest_args.parse_args(parser, sys.argv[1:])
try:
parser = dotest_args.create_parser()
args = dotest_args.parse_args(parser, sys.argv[1:])
except:
print(' '.join(sys.argv))
raise
if args.unset_env_varnames:
for env_var in args.unset_env_varnames: