Lines Matching refs:cli_args

418 def tree_from_args(cli_args: argparse.Namespace) -> kunit_kernel.LinuxSourceTree:
422 if cli_args.qemu_args:
423 for arg in cli_args.qemu_args:
426 kunitconfigs = cli_args.kunitconfig if cli_args.kunitconfig else []
427 if cli_args.alltests:
432 return kunit_kernel.LinuxSourceTree(cli_args.build_dir,
434 kconfig_add=cli_args.kconfig_add,
435 arch=cli_args.arch,
436 cross_compile=cli_args.cross_compile,
437 qemu_config_path=cli_args.qemu_config,
441 def run_handler(cli_args: argparse.Namespace) -> None:
442 if not os.path.exists(cli_args.build_dir):
443 os.mkdir(cli_args.build_dir)
445 linux = tree_from_args(cli_args)
446 request = KunitRequest(build_dir=cli_args.build_dir,
447 make_options=cli_args.make_options,
448 jobs=cli_args.jobs,
449 raw_output=cli_args.raw_output,
450 json=cli_args.json,
451 timeout=cli_args.timeout,
452 filter_glob=cli_args.filter_glob,
453 filter=cli_args.filter,
454 filter_action=cli_args.filter_action,
455 kernel_args=cli_args.kernel_args,
456 run_isolated=cli_args.run_isolated,
457 list_tests=cli_args.list_tests,
458 list_tests_attr=cli_args.list_tests_attr)
464 def config_handler(cli_args: argparse.Namespace) -> None:
465 if cli_args.build_dir and (
466 not os.path.exists(cli_args.build_dir)):
467 os.mkdir(cli_args.build_dir)
469 linux = tree_from_args(cli_args)
470 request = KunitConfigRequest(build_dir=cli_args.build_dir,
471 make_options=cli_args.make_options)
480 def build_handler(cli_args: argparse.Namespace) -> None:
481 linux = tree_from_args(cli_args)
482 request = KunitBuildRequest(build_dir=cli_args.build_dir,
483 make_options=cli_args.make_options,
484 jobs=cli_args.jobs)
493 def exec_handler(cli_args: argparse.Namespace) -> None:
494 linux = tree_from_args(cli_args)
495 exec_request = KunitExecRequest(raw_output=cli_args.raw_output,
496 build_dir=cli_args.build_dir,
497 json=cli_args.json,
498 timeout=cli_args.timeout,
499 filter_glob=cli_args.filter_glob,
500 filter=cli_args.filter,
501 filter_action=cli_args.filter_action,
502 kernel_args=cli_args.kernel_args,
503 run_isolated=cli_args.run_isolated,
504 list_tests=cli_args.list_tests,
505 list_tests_attr=cli_args.list_tests_attr)
513 def parse_handler(cli_args: argparse.Namespace) -> None:
514 if cli_args.file is None:
518 with open(cli_args.file, 'r', errors='backslashreplace') as f:
522 request = KunitParseRequest(raw_output=cli_args.raw_output,
523 json=cli_args.json)
576 cli_args = parser.parse_args(massage_argv(argv))
581 subcomand_handler = subcommand_handlers_map.get(cli_args.subcommand, None)
587 subcomand_handler(cli_args)