aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/kunit/kunit_config.py
diff options
context:
space:
mode:
authorBrendan Higgins <brendanhiggins@google.com>2021-05-26 14:24:06 -0700
committerShuah Khan <skhan@linuxfoundation.org>2021-06-11 16:10:23 -0600
commit87c9c16317882dd6dbbc07e349bc3223e14f3244 (patch)
treefd678aef9225e5272a2a74ae8e9f95d895e2d61e /tools/testing/kunit/kunit_config.py
parentDocumentation: kunit: document support for QEMU in kunit_tool (diff)
downloadlinux-dev-87c9c16317882dd6dbbc07e349bc3223e14f3244.tar.xz
linux-dev-87c9c16317882dd6dbbc07e349bc3223e14f3244.zip
kunit: tool: add support for QEMU
Add basic support to run QEMU via kunit_tool. Add support for i386, x86_64, arm, arm64, and a bunch more. Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: David Gow <davidgow@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/kunit_config.py')
-rw-r--r--tools/testing/kunit/kunit_config.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py
index 1e2683dcc0e7..c77c7d2ef622 100644
--- a/tools/testing/kunit/kunit_config.py
+++ b/tools/testing/kunit/kunit_config.py
@@ -52,8 +52,13 @@ class Kconfig(object):
return False
return True
+ def merge_in_entries(self, other: 'Kconfig') -> None:
+ if other.is_subset_of(self):
+ return
+ self._entries = list(self.entries().union(other.entries()))
+
def write_to_file(self, path: str) -> None:
- with open(path, 'w') as f:
+ with open(path, 'a+') as f:
for entry in self.entries():
f.write(str(entry) + '\n')