1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00
Commit Graph

81 Commits

Author SHA1 Message Date
Marc Bonnici
77f0b1f06d docs: Add readthedocs config and requirements.txt
The default versions used for sphinx and docuilts on
readthedocs are no longer compatible. Explicitly list
the package versions that should be used when building
the documentation.
2021-10-28 11:03:08 +01:00
Douglas Raillard
b719808ef2 target: Add Target.pull(via_temp=False) parameter
Allow pulling a file via a temporary location on the target, to
side-step performance issues when pulling big files from sysfs.
2021-10-08 13:14:42 +01:00
Marc Bonnici
5cf18a7b3c docs: Add note to hostid about PowerPc64 devices
Add caveat for the hostid on PowerPC64 devices due to the library
used when linking the included binary.
2021-04-19 10:46:46 +01:00
Marc Bonnici
ca84124fae doc/target: Fix Typo 2021-04-07 18:21:33 +01:00
Marc Bonnici
1f41853341 docs/target: Add new Target attributes 2021-04-07 18:21:33 +01:00
Marc Bonnici
09d0a0f500 docs: Fix Formatting / typos 2021-03-31 11:02:49 +01:00
douglas-raillard-arm
d953377ff3 doc: Extend doc of Target.background()
Add doc for parameters "force_locale" and "timeout".
2021-03-24 19:05:50 +00:00
Jonathan Paynter
1fc9f6cc94 doc/target: Add polling to target push method
Update the documentation for ``target`` to mention transfer polling,
and redirect to more information in ``connection``.
2020-11-03 10:01:43 +00:00
Jonathan Paynter
ef2d1a6fa4 doc/connection: Add transfer poll parameter info
Also update SSHConnection parameters to reflect the current state.
2020-11-03 10:01:43 +00:00
Jonathan Paynter
b2950686a7 devlib/target: Enable screen stay-on mode:
Adds the ability to set the android global setting
``stay_on_while_plugged_in``.

This setting has 4 main modes:
- 0: never stay on
- 1: stay on when plugged in to AC charger
- 2: stay on when plugged in to USB charger
- 4: stay on when wirelessly charged

These values can be OR-ed together to produce combinations.
2020-09-02 18:06:07 +01:00
douglas-raillard-arm
24e6de67ae target: Add Target.{push,pull}(globbing=False) parameter
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.
2020-07-20 15:49:14 +01:00
douglas-raillard-arm
07bbf902ba docs/target: Update Target.{push,pull}() description
Document the fact that it accepts folders as source and destination in
addition to files.
2020-07-20 15:49:14 +01:00
douglas-raillard-arm
590069f01f target: Add Target.makedirs()
Create a directory on the target.
2020-07-20 15:49:14 +01:00
Marc Bonnici
bae741dc81 docs/overview: Fix python2 style print 2020-06-08 17:37:06 +01:00
Marc Bonnici
ccde9de257 devlib/AndroidTarget: Update screen state methods to handle doze
Newer devices can have a "DOZE" or always on screen state.
Enable the screen state to handle these cases and report these
states as `ON`.
2020-06-05 17:12:35 +01:00
Marc Bonnici
ea9f9c878b docs/ssh: Add note about connecting to passwordless machines. 2020-05-13 16:42:58 +01:00
Marc Bonnici
3c85738f0d docs/target: Fix method name 2020-05-12 10:25:08 +01:00
Marc Bonnici
45881b9f0d utils/android: Expose connection_attempts argument to AdbConnection
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.
2020-05-12 10:24:47 +01:00
Marc Bonnici
b6cab6467d docs: Add LinuxTarget and LocalLinuxTarget to the documentation 2020-03-20 15:35:16 +00:00
Marc Bonnici
ec0a5884c0 docs: Update to use module diretive
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.
2020-03-20 15:35:16 +00:00
Marc Bonnici
b72fb470e7 docs: Update to include Collector information 2019-12-20 15:16:32 +00:00
Marc Bonnici
baa7ad1650 devlib/AndroidTarget: Move adb specific commands into the ADB connection
The `AndroidTarget` class should not depend on ADB specific commands as
is is possible to use this target with other connection types e.g. ssh.
Therefore move the adb specific commands into the `AdbConnection`.

- `wait_for_device` and `reboot_bootloader` are now exposed in AndroidTarget
as generic methods and call through to the connection method.
- `adb_kill_server` is now a standalone function of the AdbConnection.
2019-12-20 15:15:45 +00:00
Marc Bonnici
745dc9499a modules/flash: Add a connect parameter to the flash method
Adds a `connect` parameter to the flash method to specifiy whether
devlib should attempt to connect to the target after flashing has
completed.
2019-11-28 17:11:24 +00:00
Michalis Spyrou
0fa91d6c4c Add options to ssh connection
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>
2019-11-21 14:19:34 +00:00
Marc Bonnici
d4f3316120 doc/target: Update documentation for install_module 2019-10-22 17:58:34 +01:00
Marc Bonnici
c5d06ee3d6 doc/target: Correct terminology 2019-10-22 17:58:34 +01:00
Marc Bonnici
6b72b50c40 docs/instrumenation: Document teardown behaviour for instrument API 2019-10-03 11:36:11 +01:00
Marc Bonnici
c73266c3a9 docs/instrumentation: Fix typos 2019-10-03 11:36:11 +01:00
Marc Bonnici
66de30799b doc/connection: Update connection documentation 2019-09-11 10:46:00 +01:00
Douglas RAILLARD
9c86174ff5 target: Add Target.execute(force_locale='C') parameter
To avoid locale-specific variations in the output of commands, set LC_ALL=C by
default. This can be disabled by using None, or set to another locale.
2019-09-04 16:09:06 +01:00
Douglas RAILLARD
988de69b61 target: Add Target.revertable_write_value()
Same as write_value(), but returns a context manager that will write
back the old value on exit.

Also add batch_revertable_write_value() that takes a list of kwargs
dict, and will call revertable_write_value() on each of them, returning
a single combined context manager.
2019-07-30 18:05:21 +01:00
Quentin Perret
e01a76ef1b doc: Explain the 'tar' flag of target.read_tree_values
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
2019-02-01 11:21:09 +00:00
Douglas RAILLARD
22a5945460 ftrace: Turn TraceCollector into a context manager
This allows using an TraceCollector instance as a context manager, so
tracing will stop even if the devlib application is interrupted, or if
an exception is raised.
2018-12-03 15:20:48 +00:00
Marc Bonnici
4a4739cefb doc: Fix formatting 2018-10-31 10:17:21 +00:00
Marc Bonnici
01c39cfe4c doc/conns: Update documentation to include strip_colors parameter 2018-10-31 10:17:21 +00:00
Marc Bonnici
fa41bb01d2 modules: Update docs with 'setup' stage for module initialization
Update documentation to include the 'setup' stage for module
initialization.
2018-10-10 10:31:45 +01:00
Pierre-Clement Tosi
63d2fb53fc Instrument/BaylibreAcme: Add IIO-based ACME instr.
Add BaylibreAcmeInstrument, a new instrument providing support for the
Baylibre ACME board as a wrapper for the IIO interface. This class
provides better access to the ACME hardware (e.g. the ability to control
the sampling frequency) and to the retrieved samples than what the other
instrument, AcmeCapeInstrument, provides. Furthermore, it removes an
unnecessary and limiting dependency by interfacing directly with the IIO
drivers instead of relying on an intermediate script ("iio-capture") potentially
introducing unexpected bugs. Finally, it allows handling multiple probes
(the ACME can have up to 8) through an easy-to-use single instance of this
class instead of having to have an instance of AcmeCapeInstrument per channel
potentially (untested) leading to race conditions between the underlying
scripts for accessing the hardware.

This commit does not overwrite AcmeCapeInstrument as
BaylibreAcmeInstrument does not provide interface compatibility with
that class. Anyhow, we believe that anything that can be achieved with
AcmeCapeInstrument can be done with BaylibreAcmeInstrument (the
reciprocal is not true) so that BaylibreAcmeInstrument might eventually
replace AcmeCapeInstrument.

Add BaylibreAcmeInstrument documentation detailing the class interface
and the ACME instrument itself and discussing the way it works and its
potential limitations.
2018-08-22 16:00:25 +01:00
Douglas RAILLARD
cc0582ef59 exceptions: Update doc for transient exceptions 2018-08-15 14:32:53 +01:00
Sergei Trofimov
e8a03e00f3 doc: mention ChromeOsTarget in overview
Mention ChromeOsTarget when listing available target types in the
overview.
2018-07-18 09:59:11 +01:00
Marc Bonnici
4b5f65699f doc/version: Update to release version 2018-07-13 16:05:49 +01:00
Sergei Trofimov
ae8db119a9 doc: document Target.model
Add missing documentation for Target.model
2018-07-13 13:18:39 +01:00
Sergei Trofimov
472c5a3294 target: add system_id
Add system_id attribute to targets. This ID is supposed unique for a
combination of hardware, kernel, and the file system, and contains
elements from each.

1. Hardware is identified by the concatenation of MAC addresses of
   'link/ether' network  interfaces on the system. This method is used,
   as DMI tables are often unimplemented on ARM targets.
2. The kernel is identified by its version.
3. The file system is identified by the concatenation of UUID's of the
   target's partitions. It would be more correct to only use UUID of
   the root partition, as system_id is not intended to be affected by
   removable, media, however, there is no straight-forward way of
   reliably identifying that without root.

system_id is intended to be used as an key for the purposes of caching
information about a particular device (e.g. so that it does not need to
be probed on each run).
2018-07-13 13:18:39 +01:00
Marc Bonnici
533a2fd2c1 doc/target: Fix typo in method description 2018-06-28 12:48:00 +01:00
Marc Bonnici
a35f715b63 doc/cpufreq: Add docs for max/min frequency methods.
Adds documentation for the previously added methods in commit
a1e58cd8b1 and clarify existing method
documentation.
2018-06-01 17:27:37 +01:00
Sergei Trofimov
b88b400d8d doc: document capture_screen timestamp
Updated documentation for capture_screen with the information about the
optional timestamp format tag.
2018-04-11 11:01:45 +01:00
Marc Bonnici
59e2f2d126 docs/target: Add install_if_neeeded method info 2018-04-10 17:36:04 +01:00
Marc Bonnici
17c110cc97 doc/target: Add ChromeOs Target documentation 2018-01-25 06:27:55 +00:00
Marc Bonnici
3761b488a0 Docs: Fixed typos 2017-12-22 16:22:29 +00:00
Brendan Jackman
a2072d5c48 doc: Document as_root param of Target.push/pull 2017-12-11 08:07:50 +00:00
Brendan Jackman
486b3f524e target: Add is_network_connected method 2017-10-23 14:46:16 +01:00