Lines Matching refs:cli_args

435 def tree_from_args(cli_args: argparse.Namespace) -> kunit_kernel.LinuxSourceTree:
439 if cli_args.qemu_args:
440 for arg in cli_args.qemu_args:
443 kunitconfigs = cli_args.kunitconfig if cli_args.kunitconfig else []
444 if cli_args.alltests:
449 return kunit_kernel.LinuxSourceTree(cli_args.build_dir,
451 kconfig_add=cli_args.kconfig_add,
452 arch=cli_args.arch,
453 cross_compile=cli_args.cross_compile,
454 qemu_config_path=cli_args.qemu_config,
458 def run_handler(cli_args: argparse.Namespace) -> None:
459 if not os.path.exists(cli_args.build_dir):
460 os.mkdir(cli_args.build_dir)
462 linux = tree_from_args(cli_args)
463 request = KunitRequest(build_dir=cli_args.build_dir,
464 make_options=cli_args.make_options,
465 jobs=cli_args.jobs,
466 raw_output=cli_args.raw_output,
467 json=cli_args.json,
468 summary=cli_args.summary,
469 failed=cli_args.failed,
470 timeout=cli_args.timeout,
471 filter_glob=cli_args.filter_glob,
472 filter=cli_args.filter,
473 filter_action=cli_args.filter_action,
474 kernel_args=cli_args.kernel_args,
475 run_isolated=cli_args.run_isolated,
476 list_tests=cli_args.list_tests,
477 list_tests_attr=cli_args.list_tests_attr)
483 def config_handler(cli_args: argparse.Namespace) -> None:
484 if cli_args.build_dir and (
485 not os.path.exists(cli_args.build_dir)):
486 os.mkdir(cli_args.build_dir)
488 linux = tree_from_args(cli_args)
489 request = KunitConfigRequest(build_dir=cli_args.build_dir,
490 make_options=cli_args.make_options)
499 def build_handler(cli_args: argparse.Namespace) -> None:
500 linux = tree_from_args(cli_args)
501 request = KunitBuildRequest(build_dir=cli_args.build_dir,
502 make_options=cli_args.make_options,
503 jobs=cli_args.jobs)
512 def exec_handler(cli_args: argparse.Namespace) -> None:
513 linux = tree_from_args(cli_args)
514 exec_request = KunitExecRequest(raw_output=cli_args.raw_output,
515 build_dir=cli_args.build_dir,
516 json=cli_args.json,
517 summary=cli_args.summary,
518 failed=cli_args.failed,
519 timeout=cli_args.timeout,
520 filter_glob=cli_args.filter_glob,
521 filter=cli_args.filter,
522 filter_action=cli_args.filter_action,
523 kernel_args=cli_args.kernel_args,
524 run_isolated=cli_args.run_isolated,
525 list_tests=cli_args.list_tests,
526 list_tests_attr=cli_args.list_tests_attr)
534 def parse_handler(cli_args: argparse.Namespace) -> None:
535 if cli_args.file is None:
539 with open(cli_args.file, 'r', errors='backslashreplace') as f:
543 request = KunitParseRequest(raw_output=cli_args.raw_output,
544 json=cli_args.json, summary=cli_args.summary,
545 failed=cli_args.failed)
598 cli_args = parser.parse_args(massage_argv(argv))
603 subcomand_handler = subcommand_handlers_map.get(cli_args.subcommand, None)
609 subcomand_handler(cli_args)