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

297 Commits

Author SHA1 Message Date
Anouk Van Laer
35987d5281 Gem5Connection: Correct pull method
The pull method used when connecting to gem5 uses the 'm5 writefile'.
This only works if the file to pulled in, is in the current working directory
on the target. The file therefore might need to be copied on the target, from its
original location to the working directory.
The previous implemention of this was incorrect and used information about the
current working directory on the host.
2017-05-17 15:49:20 +01:00
Sergei Trofimov
69a83d4128 target: add new methods
Added the following method to targets:

- sleep: sleep on target for the specified duration. In some situations,
         e.g. on simulation platforms, it is important that sleep
	 happens on the target rather than the host.

Added the following methods to Android targets:

- ensure_screen_is_off: complements the existing ensure_screen_is_on.
- homescreen: navigate to home screen.
2017-05-12 11:54:31 +01:00
Sergei Trofimov
8b2ac8d29d AndroidTarget: move _execute_util to internal methods. 2017-05-12 11:48:19 +01:00
Sergei Trofimov
97a89970d0 android: downgrading ls command log to debug
The format of an ls command is an implementation detail rather than
something of immediate interest to the user. Debug level is more
appropriate than info for this kind of message.
2017-05-12 10:45:42 +01:00
Sergei Trofimov
92d9e690f0 ftrace: add an option to report on target
trace-cmd is a Linux-specific executable that is not available on other
operating systems (even on other Unixes). The option to report on target
allows acquiring text trace even if the host is not running Linux.
2017-05-12 09:14:40 +01:00
Sergei Trofimov
61b13383a4 ftrace: chmod trace.dat to make world-readable
On some targets, umask is set such that the generated trace.dat is not
world-readable by default. This means it cannot be pulled from target.
2017-05-12 09:14:36 +01:00
Sergei Trofimov
7e80a381d8 ftrace: fix get_trace when outfile is directory
If the path passed into get_trace() is a directory, the collector is
supposed to use the name of the output file on target for the file on
the host. Until now however, os.path.dirname() was mistakenly called on
the target location (returning the containing directory rather than the
base name of the file).
2017-05-12 09:14:35 +01:00
setrofim
4dc54728c1 Merge pull request #122 from Sticklyman1936/propagate_check_error_code
Propagate check_error_code
2017-05-11 10:37:10 +01:00
Sascha Bischoff
f5906cb4ab Gem5Connection: Propagate the check_error_code flag
Previously, the flag was not propagated, so the error code was always
checked. With this change, we propage it to the _gem5_shell method.
2017-05-11 10:34:24 +01:00
setrofim
bb7591e8fa Version bump. 2017-05-04 17:39:53 +01:00
setrofim
783669371d Merge pull request #120 from bjackman/speed-up-ssh-execute
ssh: Combine exit code and main command
2017-05-04 16:59:22 +01:00
Brendan Jackman
0a20cec2d9 ssh: Combine exit code and main command
This avoids a network round trip and speeds up SSH targets.
2017-05-04 16:47:37 +01:00
setrofim
d72049d35b Merge pull request #119 from bjackman/monsoon
instrument: Add support for Monsoon Power Monitor
2017-05-04 13:09:57 +01:00
Brendan Jackman
3cfbad19bd instrument: Add support for Monsoon Power Monitor
This adds support for the Monsoon Power Monitor:

https://www.msoon.com/LabEquipment/PowerMonitor/

This device officialy supports only MS Windows so we use a tool from AOSP to
communicate with it from Unix targets:

https://android.googlesource.com/platform/cts/+/master/tools/utils/monsoon.py

The user is required to install this tool and its dependencies, then pass the
path to it as the monsoon_bin parameter.
2017-05-04 11:32:20 +01:00
setrofim
4522fe8d23 Merge pull request #117 from bjackman/adb-push-error
android: Raise better error when trying to push non-existent file
2017-05-02 08:43:24 +01:00
Brendan Jackman
e17b9c33d1 android: Raise better error when trying to push non-existent file 2017-04-28 11:32:23 +01:00
Sergei Trofimov
d968098717 Add build/ and dist/ to .gitingore
These directories contain artifacts generated by setuptools.
2017-04-26 17:19:55 +01:00
setrofim
b5ecf63638 Merge pull request #116 from bjackman/instrument-sample-rate
Add sample_rate_hz attribute to CONTINUOUS instruments
2017-04-26 16:22:33 +01:00
Brendan Jackman
0d61ee5951 daq: Rename sampling_rate->sample_rate_hz
For consistency with the new Instrument.sample_rate_hz attribute.
2017-04-26 16:19:07 +01:00
Brendan Jackman
fc81477cf8 doc/instrumentation: Fix whitespace 2017-04-26 16:00:54 +01:00
Brendan Jackman
49b547a7f6 instrument: Add sample_rate_hz attribute for CONTINUOUS instruments 2017-04-26 16:00:54 +01:00
setrofim
f7d1b0fb13 Merge pull request #115 from bjackman/fix-get-channels
instrument: Fix get_channels method
2017-04-25 16:01:26 +01:00
Brendan Jackman
1bc29d7abf instrument: Fix get_channels method
- `Instrument.channels` is a dictionary, we want the values not the
   keys; this is provded by `list_channels`.

- `InstrumentChannel` objects do not have a `measure` attribute. Use
  `kind` instead.
2017-04-25 15:58:51 +01:00
setrofim
013fc59a41 Merge pull request #113 from marcbonnici/pull
Target: Add read permissions to tmp files before pulling
2017-04-24 14:37:51 +01:00
Marc Bonnici
f6d02c6611 Target: Add read permissions to tmp files before pulling
Previously trying to pull a file from an android target would fail if the file
was owned by root, this commit adds read permissions to the file before
attempting to pull.
2017-04-21 15:27:56 +01:00
setrofim
98cf7d00c7 Merge pull request #112 from bjackman/speed-up-perturb
shutils: Speed up cpuidle_wake_all_cpus
2017-04-21 11:44:25 +01:00
Sergei Trofimov
bd27de194c SshConnection: do not try to sudo as root
If a command is executed "as_root", SshConnection always prepended
"sudo" invocation to the command, even if the user name is "root". This
causes problems on patforms that do not have "sudo".

This commit changes this behavior so that sudo is never used for root
users.
2017-04-20 17:12:01 +01:00
Brendan Jackman
e276abfcb4 shutils: Speed up cpuidle_wake_all_cpus
This can currently take several hundred milliseconds on slow targets with many
CPUs. To speed it up, use '&' to spawn the perturbations in paralell.
2017-04-20 15:43:55 +01:00
setrofim
1ab8c25ff9 Merge pull request #110 from marcbonnici/kick_off
Target: Stopped `kick_off` raising an error if command didn't timeout
2017-04-20 15:30:26 +01:00
Marc Bonnici
95102d324b Target: Stopped kick_off raising an error if command didn't timeout
On some devices backgrounding a task results in the command returning
immediately with no error. This was falsely interpreted as the command failing
to run, therefore the additional check has been removed.
2017-04-20 09:04:08 +01:00
setrofim
d27c8e3362 Merge pull request #109 from bjackman/remove-pandas
energy_probe: Remove unused pandas try-import
2017-04-19 13:11:49 +01:00
Brendan Jackman
f0f1847c60 energy_probe: Remove unused pandas try-import
Looks like this is commit-leakage.
2017-04-19 10:36:57 +01:00
setrofim
b112ed424c Merge pull request #108 from bjackman/fix-ps-android
AndroidTarget: Fix `ps` when NAME column contains spaces
2017-04-12 16:51:33 +01:00
Brendan Jackman
55c27e2c54 AndroidTarget: Fix ps when NAME column contains spaces
Targets have been observed where `ps` output contains entries with NAME columns
of the form "[foo bar]". This means the `parts` list is too long and the PsEntry
call reports too many arguments. Since NAME is the rightmost column, just fix
the number of entries we recognise to 8.
2017-04-12 16:33:48 +01:00
setrofim
f4d3c60137 Merge pull request #107 from bjackman/cpufreq-expose-tunable-error
cpufreq: Expose error when writing invalid governor tunable
2017-04-12 15:46:58 +01:00
Brendan Jackman
5c036ea669 cpufreq: Expose error when writing invalid governor tunable
If we get an TargetError when trying to set a governor tunable we currently fall
back to an older sysfs layout under the assumption that the file we tried to
write doesn't exist. However it may be that the file exists, but we tried to
write an invalid value (or something else went wrong). In this case we fall back
to the old file location, fail, and produce a nonsense error about the old path
not existing.

Instead, when we get a TargetError, check if the file exists, and fall back to
the old location only if it does not.
2017-04-12 15:41:44 +01:00
setrofim
391e95cc75 Merge pull request #106 from bjackman/cpufreq-fix-docstring
cpufreq: Fix docstring for `cpu` parameter
2017-04-10 13:06:31 +01:00
Brendan Jackman
a6fb5b57ae cpufreq: Fix docstring for cpu parameter
`cpu` can be an `int`, _or_ the full CPU name used by sysfs.
2017-04-10 11:51:50 +01:00
setrofim
ae1bfccbe2 Merge pull request #105 from marcbonnici/docs
Docs: Removed duplicate 'Platform' entry.
2017-04-06 16:39:34 +01:00
Marc Bonnici
b131dc1e13 Docs: Removed duplicate 'Platform' entry. 2017-04-06 16:12:54 +01:00
setrofim
1061c94951 Merge pull request #103 from marcbonnici/issue_102
Target: Fixes __setup_list_directory issue on production devices.
2017-03-30 08:06:41 +01:00
Marc Bonnici
0655237217 Target: Fixes __setup_list_directory issue on production devices.
As per issue #102, not all devices have permission to list the root directory
causing the ls command to be incorrectly determined. This commit changes the
directory to be checked to the working directory to ensure sufficient
permissions.
2017-03-29 17:18:49 +01:00
setrofim
119c259e73 Merge pull request #101 from bjackman/energy-probe-get-caiman-error
energy_probe: Check if caimain was broken and raise an error
2017-03-24 15:15:38 +00:00
Brendan Jackman
fdc0c0477d energy_probe: Check if caimain was broken and raise an error
This means when caiman is broken you can see the error message, instead of just
finding out later that there is no data.

We still don't detect caiman being broken until we call stop(), but it's still
an improvement.
2017-03-24 13:35:00 +00:00
setrofim
8a9e0a4819 Merge pull request #99 from marcbonnici/fix_98
cpufreq: Fixed set_x_for cpus
2017-03-17 16:02:31 +00:00
Marc Bonnici
b444ae65c9 cpufreq: Fixed set_x_for cpus
Fixes issue #98 where the passed `cpus` parameter was ignored when setting the
governor and frequency and set for all cpus instead of those specified in the
passed parameter.
Also fixes kwargs not being correctly passed for governor tunables.
2017-03-17 15:53:24 +00:00
Basil Eljuse
dfc63a1cc0 readenergy: New flag to specify execution duration
- '-d' flag allow user to specify duration in sec
	- default is 0, which means run till user termination
	  signal is received
2017-03-16 08:07:11 +00:00
Sergei Trofimov
8300344f70 readenergy: fixing the Makefile
CFLAGS in the makefile were being specified incorrectly.

- the single quotes for forcing all options to be passed as a single
  token by the shell.
- Specifying -static and -lc via -Wl is not needed.
2017-03-15 12:58:50 +00:00
setrofim
32a975be74 Merge pull request #97 from marcbonnici/invalidate_as_root
Target: Invalidates _connected_as_root on reboot or reset.
2017-03-02 15:44:44 +00:00
setrofim
a068fb9b5b Merge pull request #96 from bjackman/devlib-error-name
DevlibError: Fix project name in docstring
2017-03-02 14:04:05 +00:00