Skip to content

Commit 9bdf64b

Browse files
ihashuahkh
authored andcommitted
kunit: use KUnit defconfig by default
To improve the usability of KUnit, defconfig is used by default if no kunitconfig is present. * https://bugzilla.kernel.org/show_bug.cgi?id=205259 Fixed up minor merge conflicts - Shuah Khan <[email protected]> Signed-off-by: Vitor Massaru Iha <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent ddbd60c commit 9bdf64b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tools/testing/kunit/kunit.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
KunitParseRequest = namedtuple('KunitParseRequest',
3333
['raw_output', 'input_data'])
3434
KunitRequest = namedtuple('KunitRequest', ['raw_output','timeout', 'jobs',
35-
'build_dir', 'defconfig',
36-
'alltests', 'make_options'])
35+
'build_dir', 'alltests',
36+
'make_options'])
3737

3838
KernelDirectoryPath = sys.argv[0].split('tools/testing/kunit/')[0]
3939

@@ -60,8 +60,7 @@ def config_tests(linux: kunit_kernel.LinuxSourceTree,
6060
kunit_parser.print_with_timestamp('Configuring KUnit Kernel ...')
6161

6262
config_start = time.time()
63-
if request.defconfig:
64-
create_default_kunitconfig()
63+
create_default_kunitconfig()
6564
success = linux.build_reconfig(request.build_dir, request.make_options)
6665
config_end = time.time()
6766
if not success:
@@ -177,11 +176,6 @@ def add_common_opts(parser):
177176
help='Run all KUnit tests through allyesconfig',
178177
action='store_true')
179178

180-
def add_config_opts(parser):
181-
parser.add_argument('--defconfig',
182-
help='Uses a default .kunitconfig.',
183-
action='store_true')
184-
185179
def add_build_opts(parser):
186180
parser.add_argument('--jobs',
187181
help='As in the make command, "Specifies the number of '
@@ -210,7 +204,6 @@ def main(argv, linux=None):
210204
# The 'run' command will config, build, exec, and parse in one go.
211205
run_parser = subparser.add_parser('run', help='Runs KUnit tests.')
212206
add_common_opts(run_parser)
213-
add_config_opts(run_parser)
214207
add_build_opts(run_parser)
215208
add_exec_opts(run_parser)
216209
add_parse_opts(run_parser)
@@ -258,7 +251,6 @@ def main(argv, linux=None):
258251
cli_args.timeout,
259252
cli_args.jobs,
260253
cli_args.build_dir,
261-
cli_args.defconfig,
262254
cli_args.alltests,
263255
cli_args.make_options)
264256
result = run_tests(linux, request)

0 commit comments

Comments
 (0)