* [PATCH] kunit: use --build_dir=.kunit as default
@ 2020-04-14 22:50 Vitor Massaru Iha
0 siblings, 0 replies; only message in thread
From: Vitor Massaru Iha @ 2020-04-14 22:50 UTC (permalink / raw)
To: kunit-dev
Cc: linux-kselftest, linux-kernel, brendanhiggins, skhan,
linux-kernel-mentees
To make KUnit easier to use, and to avoid overwriting object and
.config files, the default KUnit build directory is set to .kunit
* Related bug: https://bugzilla.kernel.org/show_bug.cgi?id=205221
Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
---
tools/testing/kunit/kunit.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py
index 7dca74774dd2..5da190c79481 100755
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@ -116,7 +116,7 @@ def main(argv, linux=None):
run_parser.add_argument('--build_dir',
help='As in the make command, it specifies the build '
'directory.',
- type=str, default='', metavar='build_dir')
+ type=str, default='.kunit', metavar='build_dir')
run_parser.add_argument('--defconfig',
help='Uses a default .kunitconfig.',
@@ -136,12 +136,11 @@ def main(argv, linux=None):
if get_kernel_root_path():
os.chdir(get_kernel_root_path())
- if cli_args.build_dir:
- if not os.path.exists(cli_args.build_dir):
- os.mkdir(cli_args.build_dir)
- kunit_kernel.kunitconfig_path = os.path.join(
- cli_args.build_dir,
- kunit_kernel.kunitconfig_path)
+ if not os.path.exists(cli_args.build_dir):
+ os.mkdir(cli_args.build_dir)
+ kunit_kernel.kunitconfig_path = os.path.join(
+ cli_args.build_dir,
+ kunit_kernel.kunitconfig_path)
if cli_args.defconfig:
create_default_kunitconfig()
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-14 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 22:50 [PATCH] kunit: use --build_dir=.kunit as default Vitor Massaru Iha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).