-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Add QEMU disk image parameter #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ def __init__( | |
| machine, | ||
| rootfs, | ||
| kernel_cmdline, | ||
| disk, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is optional at the interface of |
||
| ): | ||
| self._path_to_qemu_kernel_image = path_to_qemu_kernel_image | ||
| self._available_ram = available_ram | ||
|
|
@@ -39,6 +40,7 @@ def __init__( | |
| self._machine = machine | ||
| self._rootfs = rootfs | ||
| self._kernel_cmdline = kernel_cmdline | ||
| self._disk = disk | ||
| self._qemu = Qemu( | ||
| self._path_to_qemu_kernel_image, | ||
| self._available_ram, | ||
|
|
@@ -48,6 +50,7 @@ def __init__( | |
| machine=self._machine, | ||
| rootfs=self._rootfs, | ||
| kernel_cmdline=self._kernel_cmdline, | ||
| disk=self._disk, | ||
| ) | ||
| self._console = None | ||
|
|
||
|
|
@@ -65,6 +68,8 @@ def start(self): | |
| logger.info(f"Using QEMU kernel command line: {self._kernel_cmdline}") | ||
| if self._rootfs is not None: | ||
| logger.info(f"Using QEMU root filesystem image: {self._rootfs}") | ||
| if self._disk is not None: | ||
| logger.info(f"Using QEMU additional disk image: {self._disk}") | ||
| subprocess_params = { | ||
| "stdin": subprocess.PIPE, | ||
| "stdout": subprocess.PIPE, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -293,6 +293,7 @@ def qemu_target(test_config): | |
| machine=test_config.qemu_config.qemu_machine, | ||
| rootfs=test_config.qemu_rootfs, | ||
| kernel_cmdline=test_config.qemu_config.qemu_kernel_cmdline, | ||
| disk=test_config.qemu_disk, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is optional at the interface of |
||
| ) | ||
| else: | ||
| process_ctx = nullcontext() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is optional at the interface of
__init__.py, where the default isNone. IMHO carrying this into each and every function call with default parameters, makes the code more complicated.