From a69992c8cb804e7db254f8c218cc0fe6f7a78e49 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 26 Aug 2019 16:08:53 +0000 Subject: [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 --- lldb/packages/Python/lldbsuite/test/dotest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite') diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 5eb8bd54f59..9082b78e8c6 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -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: -- cgit v1.2.3