kunit: tool: drop unused load_config argument
authorDaniel Latypov <dlatypov@google.com>
Mon, 16 May 2022 19:47:28 +0000 (12:47 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 7 Jul 2022 23:45:36 +0000 (17:45 -0600)
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: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_kernel.py
tools/testing/kunit/kunit_tool_test.py

index 3539efaf99baa1f29a999bf3c10edc496eccc81e..8bc8305ba817b3bdcbbacd4df9eb1bfd48d52dc3 100644 (file)
@@ -219,7 +219,6 @@ class LinuxSourceTree:
        def __init__(
              self,
              build_dir: str,
-             load_config=True,
              kunitconfig_path='',
              kconfig_add: Optional[List[str]]=None,
              arch=None,
@@ -233,9 +232,6 @@ class LinuxSourceTree:
                        self._arch = 'um' if arch is None else arch
                        self._ops = get_source_tree_ops(self._arch, cross_compile)
 
-               if not load_config:
-                       return
-
                if kunitconfig_path:
                        if os.path.isdir(kunitconfig_path):
                                kunitconfig_path = os.path.join(kunitconfig_path, KUNITCONFIG_PATH)
index 25a2eb3bf11494e7d981ea5cd7518597bd4b4185..b9158017ece65c823aaff9c89591eeefe2f0883f 100755 (executable)
@@ -393,7 +393,7 @@ class LinuxSourceTreeTest(unittest.TestCase):
                        return subprocess.Popen(['echo "hi\nbye"'], shell=True, text=True, stdout=subprocess.PIPE)
 
                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()
 
                        with self.assertRaises(ValueError):