Lines Matching +full:stdout +full:- +full:path
2 # SPDX-License-Identifier: GPL-2.0
50 def get_kernel_root_path() -> str:
51 path = sys.argv[0] if not __file__ else __file__
52 parts = os.path.realpath(path).split('tools/testing/kunit')
58 request: KunitConfigRequest) -> KunitResult:
67 config_end - config_start)
70 config_end - config_start)
73 request: KunitBuildRequest) -> KunitResult:
85 build_end - build_start)
89 build_end - build_start)
92 build_end - build_start)
95 request: KunitExecRequest) -> KunitResult:
108 test_end - test_start)
110 def parse_tests(request: KunitParseRequest) -> KunitResult:
124 print(f'Unknown --raw_output option "{request.raw_output}"', file=sys.stderr)
138 if request.json == 'stdout':
143 parse_end - parse_start)
146 parse_end - parse_start)
149 request: KunitRequest) -> KunitResult:
183 run_end - run_start,
190 # $ kunit.py run --json
192 # $ kunit.py run --json suite_name
195 # $ kunit.py run --json=suite_name
197 # So we hackily automatically rewrite --json => --json=stdout
199 '--json': 'stdout',
200 '--raw_output': 'kunit',
202 def massage_argv(argv: Sequence[str]) -> Sequence[str]:
203 def massage_arg(arg: str) -> str:
209 def add_common_opts(parser) -> None:
210 parser.add_argument('--build_dir',
214 parser.add_argument('--make_options',
217 parser.add_argument('--alltests',
220 parser.add_argument('--kunitconfig',
221 help='Path to Kconfig fragment that enables KUnit tests.'
226 parser.add_argument('--arch',
230 'e.g. i386, x86_64, arm, um, etc. Non-UML '
234 parser.add_argument('--cross_compile',
236 'be set to a toolchain path prefix (the prefix '
238 'example `sparc64-linux-gnu-` if you have the '
240 '`$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux-` '
242 'from the 0-day website to a directory in your '
246 parser.add_argument('--qemu_config',
247 help=('Takes a path to a path to a file containing '
251 def add_build_opts(parser) -> None:
252 parser.add_argument('--jobs',
257 def add_exec_opts(parser) -> None:
258 parser.add_argument('--timeout',
273 parser.add_argument('--kernel_args',
274 help='Kernel command-line parameters. Maybe be repeated',
277 def add_parse_opts(parser) -> None:
278 parser.add_argument('--raw_output', help='If set don\'t format output from kernel. '
279 'If set to --raw_output=kunit, filters to just KUnit output.',
281 parser.add_argument('--json',
284 'prints to stdout or saves to file if a '
286 type=str, const='stdout', default=None)
316 # and the '--file' argument is not relevant to 'run', so isn't in
332 if not os.path.exists(cli_args.build_dir):
356 not os.path.exists(cli_args.build_dir)):