mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
kunit: tool: fix improper treatment of file location
Commit01397e822a
("kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig") and commit45ba7a893a
("kunit: kunit_tool: Separate out config/build/exec/parse") introduced two closely related issues which built off of each other: they excessively created the build directory when not present and modified a constant (constants in Python only exist by convention). Together these issues broken a number of unit tests for KUnit tool, so fix them. Fixed up commit log to fic checkpatch commit description style error. Shuah Khan <skhan@linuxfoundation.org> Fixes:01397e822a
("kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig") Fixes:45ba7a893a
("kunit: kunit_tool: Separate out config/build/exec/parse") Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
6816fe61bd
commit
d43c7fb057
2 changed files with 2 additions and 26 deletions
|
@ -238,12 +238,6 @@ def main(argv, linux=None):
|
|||
if cli_args.subcommand == 'run':
|
||||
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(kunit_kernel.kunitconfig_path):
|
||||
create_default_kunitconfig()
|
||||
|
||||
if not linux:
|
||||
linux = kunit_kernel.LinuxSourceTree()
|
||||
|
@ -261,12 +255,6 @@ def main(argv, linux=None):
|
|||
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(kunit_kernel.kunitconfig_path):
|
||||
create_default_kunitconfig()
|
||||
|
||||
if not linux:
|
||||
linux = kunit_kernel.LinuxSourceTree()
|
||||
|
@ -283,12 +271,6 @@ def main(argv, linux=None):
|
|||
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(kunit_kernel.kunitconfig_path):
|
||||
create_default_kunitconfig()
|
||||
|
||||
if not linux:
|
||||
linux = kunit_kernel.LinuxSourceTree()
|
||||
|
@ -307,12 +289,6 @@ def main(argv, linux=None):
|
|||
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(kunit_kernel.kunitconfig_path):
|
||||
create_default_kunitconfig()
|
||||
|
||||
if not linux:
|
||||
linux = kunit_kernel.LinuxSourceTree()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue