Switch to have check_exit_code=True just like any other connection.
The current behavior will not raise any exception if the command returns
a non-zero exit code. This leads to failed attempt at parsing the
output, which is now an error message rather than the expected data.
Worse, the caller may never realize the command failed. This is
especially bad as that behavior will only manifest itself when things go
wrong, which is not the majority of the time, leading to code that seems
to work ok, but does not handle failure properly (like a shell script).
Lastly, since this is at odds with all the other connection types,
generic code will typically assume check_exit_code=True by default and
end up being buggy when used in conjunction of the AdbConnection.
When globbing=True, the source is interpreted as a globbing pattern on
the target and is expanded before pulling the files or folders.
This also aligns the behaviour of all targets:
* adb connection was supported a limited form of globbing by default
(only on the last component of the path)
* SCP was supporting a limited form of globbing
* GEM5 was not supporting globbing at all
* paramiko was not supporting globbing at all
Also fix a race condition on push/pull as root, where pushing/pulling
the same file from multiple threads would have ended up using the same
temporary file.
Allow for configuring the number of connection attempts that will be
made to the device before failing to connect. This allows for waiting longer
periods of time for the device to come online.
Update the documentation to indicated which module each class is
located. This allows the documentation to be referenced from other
modules as well as enabling links to the source code directly from the
documentation.
The user can pass a dictionary containg the key and value
pairs with the extra ssh configuration options. Multiple
options will be passed as '-o key1=value1 -o key2=value2'
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Perviously, a parameter passed into SshConnection controlled whether the
connection was established over SSH or Telnet. Now, there is a separate
class for Telnet connections.