提交 76f0d6f5 编写于 作者: D Daniel Latypov 提交者: Shuah Khan

kunit: tool: drop unused load_config argument

It's always set to true except in one test case.
And in that test case it can safely be set to true anyways.
Signed-off-by: NDaniel Latypov <dlatypov@google.com>
Reviewed-by: NDavid Gow <davidgow@google.com>
Reviewed-by: NBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
上级 d2fbdde8
...@@ -219,7 +219,6 @@ class LinuxSourceTree: ...@@ -219,7 +219,6 @@ class LinuxSourceTree:
def __init__( def __init__(
self, self,
build_dir: str, build_dir: str,
load_config=True,
kunitconfig_path='', kunitconfig_path='',
kconfig_add: Optional[List[str]]=None, kconfig_add: Optional[List[str]]=None,
arch=None, arch=None,
...@@ -233,9 +232,6 @@ class LinuxSourceTree: ...@@ -233,9 +232,6 @@ class LinuxSourceTree:
self._arch = 'um' if arch is None else arch self._arch = 'um' if arch is None else arch
self._ops = get_source_tree_ops(self._arch, cross_compile) self._ops = get_source_tree_ops(self._arch, cross_compile)
if not load_config:
return
if kunitconfig_path: if kunitconfig_path:
if os.path.isdir(kunitconfig_path): if os.path.isdir(kunitconfig_path):
kunitconfig_path = os.path.join(kunitconfig_path, KUNITCONFIG_PATH) kunitconfig_path = os.path.join(kunitconfig_path, KUNITCONFIG_PATH)
......
...@@ -393,7 +393,7 @@ class LinuxSourceTreeTest(unittest.TestCase): ...@@ -393,7 +393,7 @@ class LinuxSourceTreeTest(unittest.TestCase):
return subprocess.Popen(['echo "hi\nbye"'], shell=True, text=True, stdout=subprocess.PIPE) return subprocess.Popen(['echo "hi\nbye"'], shell=True, text=True, stdout=subprocess.PIPE)
with tempfile.TemporaryDirectory('') as build_dir: with tempfile.TemporaryDirectory('') as build_dir:
tree = kunit_kernel.LinuxSourceTree(build_dir, load_config=False) tree = kunit_kernel.LinuxSourceTree(build_dir)
mock.patch.object(tree._ops, 'start', side_effect=fake_start).start() mock.patch.object(tree._ops, 'start', side_effect=fake_start).start()
with self.assertRaises(ValueError): with self.assertRaises(ValueError):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册