Author: jdevlieghere Date: Mon Aug 26 09:08:53 2019 New Revision: 369922 URL: http://llvm.org/viewvc/llvm-project?rev=369922&view=rev Log: [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. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=369922&r1=369921&r2=369922&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Mon Aug 26 09:08:53 2019 @@ -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: _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits