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

376 Commits

Author SHA1 Message Date
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
setrofim
96ff1aa205 Merge pull request #95 from bjackman/android-setup-error
android: Improve error when _setup_ls fails
2017-03-02 12:03:57 +00:00
Brendan Jackman
3298205b42 android: Improve error when _setup_ls fails
If the ADB command fails (e.g. if you provide the wrong device ID), adb_command
raises a CalledProcessError. CalledProcessError doesn't print the output of the
failed command, so you get a useless error message.

This is relevent here in particular as _setup_ls is the first thing to run an
ADB command if a non-IP device ID is provided.

Catch the CalledProcessError and instead raise a HostError with the command
output in the exception message.
2017-03-01 18:56:05 +00:00
Brendan Jackman
1fa6f92064 DevlibError: Fix project name in docstring 2017-03-01 18:54:54 +00:00
setrofim
6410318b49 Merge pull request #94 from marcbonnici/typos
Modules Documentation: Fixed typos
2017-02-28 18:57:43 +00:00
Marc Bonnici
8733b9cb58 Modules Documentation: Fixed typos 2017-02-28 17:40:44 +00:00
Marc Bonnici
0687dac23b Target: Invalidates _connected_as_root on reboot or reset.
From #92, when rebooting a platform the internal connection state becomes
different from `_connected_as_root`, now clears the state upon device reboot or
reset.
2017-02-28 13:48:10 +00:00
Sergei Trofimov
08e36bf782 gem5: fix for the previous fix
Somehow went from plural to singular when passing base params. Bad
Sergei.
2017-02-27 17:24:01 +00:00
Sergei Trofimov
d40e70d7f4 gem5: updating plaform with base params
Gem5SimulationPlatfrom was not acceping base Platform's parameters, such
as core_names, making it impossible to configure them on construction.
This is rectified in this commit.
2017-02-27 17:17:31 +00:00
Sergei Trofimov
fef7c16b42 utils/misc: allow modules in walk_modules input
Previsously, the import path passed to walk_modules must have been
pointing to a package. This update allows the path to point to a single
module.
2017-02-27 17:12:20 +00:00
setrofim
05215e7e1b Merge pull request #92 from ionela-voinescu/force_adb_root
android: add support for forced adb root
2017-02-24 14:43:23 +00:00
Ionela Voinescu
66eaf15cdc android: add support for forced adb root
When rebooting a platform the internal connection state becomes
different from _connected_as_root, which was set before reboot.

Add the possibility to force adb root if you've rebooted or know
to have done something that would result in the platform having
a different connection state than the one of _connected_as_root.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
2017-02-24 14:19:25 +00:00
Sergei Trofimov
1dd6950177 utils/misc: attach exc_info on error in walk_modules
Commit 28891a82 made it easier to debug issues during walk_modules by
attaching the specific name of the module being loaded to the exception.
However, the error may not originite in the imported module, but one of
the modules that module itself is importing.

To further facilitate debugging, exc_info (which contains the traceback)
for the orginal ImportError is now also attached to the raised
HostError.
2017-02-23 09:25:23 +00:00
setrofim
23087d14f5 Merge pull request #91 from bjackman/kernelversion-fixup
Fixup KernelVersion API
2017-02-21 08:05:03 +00:00
Brendan Jackman
6665693e8f target: Fix kernel version regex for -rc field
This regex currently matches the `rc` group against the added-patches-count,
e.g. "00005" in "4.4.41-00005-g17b74bafccbe-dirty" and "59" in
"4.4.0-59-generic". Fix this by requiring "rc" in the match.
2017-02-20 18:32:12 +00:00
Brendan Jackman
18b77b8808 target: Add parts field to KernelVersion 2017-02-20 18:32:12 +00:00
Brendan Jackman
54adf80eab target: Add KernelVersion docstring 2017-02-20 18:11:52 +00:00
Brendan Jackman
03561ee72c target: Make KernelVersion fields numerical 2017-02-20 18:11:52 +00:00
setrofim
e968901fe6 Merge pull request #90 from derkling/improve-kversion-parsing
target: better parse kernel version numbers
2017-02-20 16:08:47 +00:00
Patrick Bellasi
9a8d539e03 target: better parse kernel version numbers
This adds a regexp to better parse all the kernel version numbers as well
as additional (optional) fields like SHA1 and RC.

The regexp has been made generic enough to match these examples:

4.9.0-rc6-00202-g3a60597
4.9.0-rc6-00202
4.9.0-rc6-00202-g3a60597 #321 SMP PREEMPT Mon Feb 13 12:30:59 GMT 2017 aarch64 GNU/Linux
3.18.31-g226dafe #1 SMP PREEMPT Wed Feb 15 16:34:14 GMT 2017
4.4.0-59-generic #80~14.04.1-Ubuntu SMP Fri Jan 6 18:02:02 UTC 2017
3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014
3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016
3.13.0-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016
4.8.0 #1 SMP Fri Jan 6 18:06:24 GMT 2017

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2017-02-20 12:25:08 +00:00
setrofim
b7ac9e7edc Merge pull request #89 from derkling/android-support-updates
Android support updates
2017-02-16 15:21:08 +00:00
Brendan Jackman
baa32ec716 AndroidTarget: Add charging_enabled property
Disabling battery charging can be useful for measuring power efficiency of
Android devices with hardware modified for this purpose.
2017-02-16 15:09:44 +00:00