()
| 372 | |
| 373 | |
| 374 | def parse_arguments(): |
| 375 | parser = create_parser() |
| 376 | |
| 377 | args = parser.parse_args() |
| 378 | |
| 379 | # Validate filename is provided when needed |
| 380 | if not args.status and not args.version and not args.filename: |
| 381 | parser.error("the following arguments are required: filename") |
| 382 | |
| 383 | # Only process config if filename is provided (not needed for --status) |
| 384 | if args.filename: |
| 385 | args = update_args_with_config(args, parser) |
| 386 | |
| 387 | if args.build_folder == args.build_dest: |
| 388 | parser.error("--build-folder and --build-dest cannot be the same") |
| 389 | if args.conformance_tests_folder == args.conformance_tests_dest: |
| 390 | parser.error("--conformance-tests-folder and --conformance-tests-dest cannot be the same") |
| 391 | |
| 392 | args.render_conformance_tests = args.conformance_tests_script is not None |
| 393 | |
| 394 | if not args.render_conformance_tests and args.copy_conformance_tests: |
| 395 | parser.error("--copy-conformance-tests requires --conformance-tests-script to be set") |
| 396 | |
| 397 | if not args.log_to_file and args.log_file_name != DEFAULT_LOG_FILE_NAME: |
| 398 | parser.error("--log-file-name cannot be used when --log-to-file is False.") |
| 399 | |
| 400 | if args.full_plain and args.dry_run: |
| 401 | parser.error("--full-plain and --dry-run are mutually exclusive") |
| 402 | |
| 403 | if args.status and (args.dry_run or args.full_plain): |
| 404 | parser.error("--status cannot be used with --dry-run or --full-plain") |
| 405 | |
| 406 | script_arg_names = [UNIT_TESTS_SCRIPT_NAME, CONFORMANCE_TESTS_SCRIPT_NAME, PREPARE_ENVIRONMENT_SCRIPT_NAME] |
| 407 | for script_name in script_arg_names: |
| 408 | args = process_test_script_path(script_name, args) |
| 409 | |
| 410 | return args |
no test coverage detected