Skip to content
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

qemudriver: export get_qemu_base_args method #1212

Merged
merged 3 commits into from
Sep 6, 2023

Commits on Jun 19, 2023

  1. qemudriver: refactor on_activate to use local variables

    This introduces no functional change, but makes it easier to split the
    function into two in a follow-up commit:
    
      - one function to just compute the base command line
      - one function to actually store the command line into the object
        along with QMP-specific options
    
    Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
    a3f committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    71b8505 View commit details
    Browse the repository at this point in the history
  2. qemudriver: collect QMP specific options at the end

    Next commit will factor command line computation out of on_activate to
    make it available for use with an interactively started Qemu. Prepare
    for this by collecting everything that is not applicable to non-QMP
    usage at the end of the function.
    
    No functional change intended.
    
    Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
    a3f committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    758cfaf View commit details
    Browse the repository at this point in the history
  3. qemudriver: export get_qemu_base_args method

    For debugging, it can be useful to start an interactive session for the
    user to access the DUT console. This is possible with real targets
    through labgrid-client -s STATE console, but no equivalent exists yet
    for targets using QEMUDriver. Resolving that may be a bigger
    undertaking, so for now, let's provide a class method
    get_qemu_base_args, that returns the list of arguments sans QMP parts.
    
    Users can then initialize labgrid as usual and call the function to
    get the command line and start Qemu for interactive use without having
    to duplicate the labgrid environment parsing as in [1].
    
    [1]: https://github.com/barebox/barebox/blob/v2023.05.0/test/emulate.pl#L226
    
    Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
    a3f committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    318e778 View commit details
    Browse the repository at this point in the history