These function were duplicated of each other so one has been removed and the
remaining methods renamed for consistency with WA terminology and the relevant
calls updated.
`set_sysfile_values` now accepts a `^` symbol prefixed to the
file path to indicated that the value should be written as binary data.
To accommodate this an extra `binary` flag has been added to the `set_sysfile_value`and `get_sysfile_value` methods to write and retrieve the binary data respectively.
Added property to linux device to return list of supported abis
to be consistent with android devices. Currently only returns a
list containing the primary abi.
- Device subclasses should provide their own implementation.
Default behaviour is to raise a `NotImplementedError`
- Workload subclasses can set `requires_network` to `True` and
network connectivity check will be performed during `setup()`
Add a general check that pings a IP address rather than checking the
status of dumpsys wifi due to the fact that not all devices are
connected via wifi. Intended for workloads that require an internet
connection to operate.
- device.is_rooted check was being perfromed inside validate() which
gets invoked before the device is connected. This worked for most
Android devices, because connections is a no-op for them, however
failed for Linux targets. The check is now performed inside
initialize().
- Added _is_ready() check inside is_rooted to catch similar problems
quicker in the future.
Moved ``working_directory`` parameter to BaseLinuxDevice.
Changed the default ``binaries_directory`` for AndroidDevice to allow
WA binaries to be easily separated.
kick_off has been changed to behave the same as AndroidDevice.
Said changes caused kill all to fail on rooted devices. Killall will now
behave in the same way as kick_off, if specifically told to (or not to)
run as root it will. Otherwise it will run as root if the device is rooted
- Deal with the dropped connection on issuing "reboot"
- Introduced a fixed initial delay before polling for connection to
avoid re-connecting to adevice that is still in the process of
shutting down.
Added two commands to WA to record and replay input events using revent.
As part of this also added the ability to get a device model from
android and linux device. This may need to be improved in the future.
Added:
get_binary_path: Checks binary_directory for the wanted binary, if
if its not there, it will use which to find a
system one. returns the full path
install_if_needed: will install a binary only if it is not present.
Changes:
- Busybox is now deployed to non-rooted devices
- is_installed has now been removed as the new functions supersede it
- binaries will now always be installed to `binaries_directory` and
not system folders.
- updated workloads to use these new functions
- rt-app and sysbench might still need work
Pulling entries from procfs does not work on some platforms. This commit
updates get_properites() to cat the contents of a property_file and
write it to output file on the host, rather than pulling it (directories
are still pulled).
Dynamic modules may be loaded automatically on device initialization if
the device supports them. Dynamic modules implent probe() method to
determine whether they are supported by a particular deviced.
devcpufreq and cpuidle have been converted into dynamic modules
- standardisded on a single context argument
- removed Device.init() no longer necessary as initilize now
automatically gets propagated up the hierarchy. Renamed the existing
use of it to "initilize".
- related pylint cleanup.
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.
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.
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.
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).
- 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).
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.
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".
- 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