Skip to content

Commit 43ebec9

Browse files
bjackmanshuahkh
authored andcommitted
kunit: tool: Build GDB scripts
Following a similar rationale as commit e4835f1 ("kunit: tool: Build compile_commands.json"), make a common developer tool available by default for KUnit users. Compared to compile_commands.json, there is a little more work to be done to build the GDB scripts. Is it enough to affect development cycle duration? Unscientific evaluation: rm -rf .kunit; time tools/testing/kunit/kunit.py build --kunitconfig ./lib/kunit/.kunitconfig --jobs 96 Without this patch it took 14.77s, with this patch it took 14.83. So, although `make scripts_gdb` is pretty slow, presumably most of that is just the overhead of running Kbuild at all, actually building the scripts is approximately free. Note also, to actually get the GDB scripts the user needs to enable CONFIG_SCRIPTS_GDB, but building the scripts_gdb target without that is still harmless. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Brendan Jackman <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent e275f44 commit 43ebec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/kunit/kunit_kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def make_olddefconfig(self, build_dir: str, make_options: Optional[List[str]]) -
7272
raise ConfigError(e.output.decode())
7373

7474
def make(self, jobs: int, build_dir: str, make_options: Optional[List[str]]) -> None:
75-
command = ['make', 'all', 'compile_commands.json', 'ARCH=' + self._linux_arch,
76-
'O=' + build_dir, '--jobs=' + str(jobs)]
75+
command = ['make', 'all', 'compile_commands.json', 'scripts_gdb',
76+
'ARCH=' + self._linux_arch, 'O=' + build_dir, '--jobs=' + str(jobs)]
7777
if make_options:
7878
command.extend(make_options)
7979
if self._cross_compile:

0 commit comments

Comments
 (0)