1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

78 Commits

Author SHA1 Message Date
Sergei Trofimov
4eb0d9d750 Reverting to the old way of getting the abi on Android
uname is not available on all Android devices, and we cannot rely on
busybox for establishing the ABI, as we need to get the ABI before we
can depoly the right version of busybox.
2015-06-16 15:15:18 +01:00
Sergei Trofimov
e7fae25821 list command: can now filter results by supported platform
Added -p option to the list command. This alows filtering results by
supported platforms, e.g.

	wa list workloads -p linux

Also adding missing supported_platforms attribute to various extensions.
If an extension does not have this attribute, the assumption is that it
is supported by all available platforms.
2015-06-16 12:49:07 +01:00
Sergei Trofimov
53de517488 device: set core_clusters from core_names if not explicitly specified
if core_names are specified in the device config but core_clusters are
not, assume that all cores with the same name are on the same cluster.
2015-06-16 12:21:44 +01:00
Sergei Trofimov
4d3feeba64 list_file_systems: fix for Android M and Linux devices
In previous versions of Android, "mount" returned output in the format
similar to fstab entries, which is what list_file_systems expected. This
fixes it to be able to handle the more traditional "mount" output in the
format

	<device> on <mount point> type <fs type> <options>

as well as continue to parse the Android output correctly.
2015-06-16 08:49:58 +01:00
Vasilis Flouris
2f214da8a2 fix: uname utility is unavailable in Android. It has to be invoked through busybox. 2015-06-11 18:58:34 +01:00
Sergei Trofimov
557b792c77 Made abi property common between Android and Linux devices
In both cases, the ABI is now obtained by executing "uname -m" on the
device and perfroming a mapping from the returned machine architecture
a known ABI. If no known ABI is found the architecture string itself is
returned.
2015-06-11 17:45:09 +01:00
Sergei Trofimov
ecb1a9f1f9 Adding /proc/cmdline to pulled metadata 2015-06-02 15:05:52 +01:00
Vasilis Flouris
1fa93c04d2 fixes a few minor bugs. 2015-06-02 10:53:20 +01:00
Sergei Trofimov
ebe6202e22 push/pull commands always raise DeviceError + handle error on pulling a property file.
Previosuly, they raised CalledProcessError/DeviceError based on
implementation. Making it consistent to facillitated handling in calling
code.
2015-06-01 17:25:59 +01:00
Sergei Trofimov
b4971d76d6 pull more stuff during run initialization
added more paths to pull by default when device.get_properties is
invoked during run initialization. Also moved the LinuxDevice
implementation into BaseLinuxDevice, so that AndroidDevice tires to pull
the same files (on top of the Android-specific stuff).
2015-06-01 16:41:33 +01:00
Sergei Trofimov
adefbb7b2c android devices: updating executable install/uninstall work on unrooted devices 2015-06-01 12:19:54 +01:00
Sergei Trofimov
a254a44f0e adding abi property to LinuxDevice 2015-05-28 09:08:46 +01:00
Sergei Trofimov
9b16e3f282 linux device: removing (keyfile or password) validation check
It may be possible to connect to a device without either, so it
should not be invalid to not specifiy either in the device config.
2015-05-13 08:46:10 +01:00
Sergei Trofimov
40bd32280a minor fixes to cpufreq APIs
- adding missing cpu id conversion to set_cpu_min_freq
- adding "exact" parameter to set_cpu_frequency; only produce an error
  when the specified frequency is not supported by the cpu if "axact"
  is set; (otherwise let cpufreq decide what the actual frequency will
  be).
2015-05-11 12:12:41 +01:00
Vasilis Flouris
2929106049 Energy model: fixing sysbench taskset failure
Make sure when migrating sshd to root cgroup also migrate their
children, including the bash for the wa session. So the subsequent
processes kicked off from that shell can be taskset to any cluster.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
950f0851bf Fix: implementing get_pid_of() and ps() for linux devices.
Existing implementation relied on android version of ps.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
c82dd87830 Adding cpuidle modules and refactoring Device cpufreq APIs.
cpuidle module implements cpuidle state discovery, query and
manipulation for a Linux device. This replaces the more primitive
get_cpuidle_states method of LinuxDevice.

Renamed APIs (and added a couple of new ones) to be more consistent:

"core" APIs take a core name as the parameter (e.g. "a15") or whatever
is listed in core_names for that device.
"cluster" APIs take a numeric cluster ID (eg. 0) as the parameter. These
get mapped using core_clusters for that device.
"cpu" APIs take a cpufreq cpu ID as a parameter. These could be
integers, e.g. 0, or full string id, e.g. "cpu0".
2015-05-11 12:12:40 +01:00
Sergei Trofimov
bb6421b339 Fixing file_exists on linux devices. 2015-04-28 10:29:47 +01:00
Sergei Trofimov
c5d3c2bd62 Fixing reboot on Linux devices [part 2]
- connect() to device before issuing the initial reboot, as soft reset
  requires a device connection.
- boot() has been implemented to wait properly for the device to reboot
  after reset.
- port now defaults to 22 rather than being left unset, as need
  something to connect to when polling for device after reboot.
- Only use -P option for scp when port is *not* 22; as that option
  appears to cause intermittent issues with default scp on Ubuntu 12.04
2015-04-10 17:04:22 +01:00
Sergei Trofimov
fea32de3d3 Parameterizing password prompt for sudo in Ssh interface.
On some devices, sudo presents a different prompt when asking for a
password. All the prompt to be specified in device configruation to
handle such cases.
2015-04-10 09:03:48 +01:00
Sergei Trofimov
7b5f5e2ed0 Fixing Linux device reset.
_is_ready was being set to False before invoking execute("reboot")
causing a device not ready error.
2015-04-07 09:09:13 +01:00
Lisa Nguyen
a7895a17bf common/linux/device.py: Create binaries_directory path if it doesn't exist
Some Linux devices may run on minimal root file systems
(e.g. buildroot) where /usr/local/bin path doesn't exist. Create
the binaries_directory if it doesn't exist instead of letting WA
quit and return errors such as:

INFO     Runner: Skipping the rest of the iterations for this spec.
ERROR    Runner: Error while running memcpy
ERROR    Runner: CalledProcessError("Command 'sshpass
                  -p '<password>' /usr/bin/scp -r
                  /usr/local/lib/python2.7/dist-packages/
                  wlauto-2.3.0-py2.7.egg/wlauto/workloads/memcpy
                  /memcpy root@192.168.x.x:/usr/local/bin/memcpy'
                  returned non-zero exit status 1")
ERROR    Runner: Got:
ERROR    Runner:
ERROR    Runner: scp: /usr/local/bin/memcpy:
                  No such file or directory

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-01 08:05:11 +01:00
Sergei Trofimov
925c354551 Fix hotplugging all cores on a cluster.
When attempting to set number of cores on a cluster to 0, make
sure at least one core is enabled on the other cluster beforehand.
2015-03-27 12:54:26 +00:00
Vasilis Flouris
5c48b75375 Adding dumpsys window output to __meta 2015-03-25 17:56:58 +00:00
Vasilis Flouris
01d4126cc8 Fix for 64 bit revent [part 2]
The struct used to read events is being padded when built for 64
bit platforms. The padding has been made explicit in the struct, and
matching padding was added when writing the events during recording.
2015-03-23 18:59:54 +00:00
Kevin Hilman
bf12d18457 common/linux/device.py: don't require sudo if already root user
On generic_linux devices, one might ssh as the root user, in which
case there is no need to use sudo.

In addition, some root filesystems may not have sudo (e.g. minimal
buildroot/busybox).

This patch attempts to detect the root user using 'id -u' and, if it
detects the root user, avoids the use of sudo for running commands as
well.

Cc: Lisa Nguyen <lisa.nguyen@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
(setrofim: modified to only test once)
2015-03-23 10:18:32 +00:00
Sergei Trofimov
ee7f22e902 Fixing 64bit revent
Then number of input event files was being written as a size_t but read
as an int by revent. These types have different sizes with 64bit GCC,
causing revent not being able to replay recorded files. This comint
updates revent to use size_t when both reading and writing.
2015-03-20 09:25:57 +00:00
Sergei Trofimov
a747ec7e4c Initial commit of open source Workload Automation. 2015-03-10 13:09:31 +00:00