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

SSHDriver to use tools to find ssh/scp/sshfs/scp #1553

Open
mattyclarkson opened this issue Nov 28, 2024 · 0 comments
Open

SSHDriver to use tools to find ssh/scp/sshfs/scp #1553

mattyclarkson opened this issue Nov 28, 2024 · 0 comments

Comments

@mattyclarkson
Copy link

Other drivers use self.target.env.config.get_tool(...) to retrieve a tool path from the configuration.

The SSHDriver uses raw "ssh", "scp", "rsync" and "sshfs" calls.

It would be useful to respect those keys in the configuration tools map. Then OpenSSH binaries can be provided in the configuration that may have been hermetically built by an external system. This would require to add a lookup for those keys in the SSHDriver and update the subcommands to use the result.

Some tools have the following pattern:

        # FIXME make sure we always have an environment or config
        if self.target.env:
            self.tool = self.target.env.config.get_tool('dfu-util')
        else:
            self.tool = 'dfu-util'

The tests for SSHDriver do not always provide a config so would need the same pattern. Should we change the tests to always provide a configuration? Are there legitimate situations that the SSHDriver is used without a configuration?

The keys would be added to TOOL KEYS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant