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

77 Commits

Author SHA1 Message Date
Sergei Trofimov
b3de85455a Add support for Python 3
Add support for running under Python 3, while maintaining compatibility
with Python 2.

See http://python-future.org/compatible_idioms.html for more details
behind these changes.
2018-06-07 14:48:40 +01:00
Marc Bonnici
2cd355195f fw/rt_config: Fix validation checks
Remove unnecessary validation checks and fix remaining so they don't fail
under certain combinations of parameters.
2018-06-01 15:33:10 +01:00
Marc Bonnici
9035c654bd fw/rt_config: Allow for auto determine 'max' and 'min' for other freqs
Allow users to specify 'max' and 'min' for the maximum and minimum
frequencies to be set for a cpu as well as the current frequency.
2018-06-01 15:33:10 +01:00
Marc Bonnici
e1518e8c5d fw/rt_config: Refactor and fix method calls to resolve 'max'/'min'
Previously incorrect method calls were used to try and convert 'max' and
'min' into their corresponding frequencies, now call the correct methods
and refactor the conversion into a separate method.
2018-06-01 15:33:10 +01:00
Sergei Trofimov
43d047eeb5 fw: implement reboot signals
- Wire up reboot signals via the TargetManager
- Add instrument mappings for the same.
2018-05-29 11:56:39 +01:00
Marc Bonnici
dc41af1f3f framework/tm: Ensure RebootPolicy is respected with unresponsive target
Expose the RebootPolicy as an attribute of the ExectionContext and ensure
that that the target is not automatically rebooted if the reboot
policy is set to "Never".
2018-05-23 10:14:34 +01:00
Marc Bonnici
a61bca1a54 target/info: Fix typo 2018-05-14 16:34:10 +01:00
Sergei Trofimov
629abb1afc fw/target: add hostname to TargetInfo
Would especially be useful for Linux targets.
2018-05-10 11:51:24 +01:00
Sergei Trofimov
30eb98b275 fw/target: add hostid to TargetInfo
Add hostid entry, as reported by busybox's hostid applet, to TargetInfo.
This is intended to be a "unique 32-bit identifier for the current
machine". In practice, it may not be set, or may be generated from
something like an IP address, so may not be unique. However, if set, it
is still likely to be more unique than kernel/os version so may be worth
recording.
2018-05-10 11:51:24 +01:00
sergei Trofimov
181862b7ff fw/target: add sched_features to TargetInfo
Attempt to read scheduler features (debugfs might not be mounted) and
add them to TargetInfo.
2018-05-10 11:51:24 +01:00
sergei Trofimov
84fba8617d fw/target: enhanced cpu info
Replace Target.cpuinfo, which contained parsed contents of
/proc/cpuinfo, with a list of more comprehensive CpuInfo objects which
include cpufreq and cpuidle information as well.
2018-05-10 11:51:24 +01:00
sergei Trofimov
2d39e5699f fw/target: make TargetInfo more POD-like
Split out the loading of the TargetInfo from a target into a separate
function, leaving TargetInfo as a simple container.
2018-05-10 11:51:24 +01:00
Marc Bonnici
85d5d4f7df target/chromeosassistant: Fix missing disable_selinux parameter
Adds missing `disable_selinux` parameter to the chromeos assistant and
pass it to the android assistant if applicable.
2018-03-29 16:22:21 +01:00
Sergei Trofimov
10f79c37c2 fw/target/descriptor: add usability functions
- Add SimpleTargetDescriptor that simply returns a global list of target
  descriptions.
- Add create_target_description function to populate that list with a
  description crated from the specified components.
- Add add_description_for_target helper function to create a description
  for the specified target class, and specified components. For
  components that are not explicitly specified, attempt to guess
  sensible defaults based on the target class' bases.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
9303c70727 fw/target/descriptor: fixes
- fix TargetDescription._set to set lists rather than dicts for params
  to be consistent with how params are set after creation (should
  probably get rid of this entirely...)
- fix the comment describing the structure of TARGETS
2018-03-08 11:18:12 +00:00
Sergei Trofimov
6fe31d6cad fw/execution: Handle unresponsive targets
If a target error occurs, check whether the target is unresponsive. If
it is, attempt to hard reset it if possible, or gracefully terminate
execution if not.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
fdb872d9cd fw/target/manager: Add verify_target_responsive()
Add a method to check that the target is still responsive, and cache
the value so that the target does not need to be repeatedly probed
during various stages of wrapping up execution.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
0728f35cbe framwork/target: parameterize disabling of SELinux
Add a parameter to optionally not attempt to disable SELinux as that can
cause problems on some platforms.
2018-02-22 11:20:35 +00:00
Marc Bonnici
52dca17fef target/descriptor: Fix generate target default config
Was previously expecting a dictionary of parameter attributes however the
actual type is a list.
2018-02-15 13:42:48 +00:00
Marc Bonnici
22a2ccf7d6 target/logcatpoller: Make capitalisation consistent 2018-02-07 10:01:12 +00:00
Marc Bonnici
728057dbba target/androidassistant: Fix Logcat poller creation
Threads cannot be restarted therfore we need to create a new polling
thread for each time the poller is started.
2018-02-07 10:01:12 +00:00
Marc Bonnici
36309a4cf2 target/assistant: Fix logcat poller
Rename the `start` method to `run` as this is what is what is called
by the threading module's `start` method, otherwise this causes the
polling to be done in the main thread blocking execution.
2018-02-07 10:01:12 +00:00
Marc Bonnici
1101c358d0 framework/rt_config: Add support for chromeos for some AndroidRTConfig
Allows setting of select android runtime configuration for devices running
chromeos and which support android. Currently only 'brightness' is functioning
correctly therefore the other parameters are only enable for standard android devices.
2018-01-25 06:32:37 +00:00
Marc Bonnici
b4d6017dd4 framework/descriptor: Add ChromeOsTarget 2018-01-25 06:32:37 +00:00
Marc Bonnici
a7bf5c2df9 ChromeOsAssistant: Add assistant for ChromeOS 2018-01-25 06:32:37 +00:00
Marc Bonnici
776a4d850b framework/rt_config: Remove over cautious error checking.
Previously when validating cpufreq runtime parameters it would check too
early whether the cpu was online, not allowing for the fact that the cpu
might be being onlined before the parameter was committed to the device.
2018-01-18 16:16:45 +00:00
Marc Bonnici
3cf789e352 framework/rt_config: Fix not being able to turn off all cpus in cluster
Add missing equality sign in constraint for runtime parameters.
2018-01-18 16:16:45 +00:00
Marc Bonnici
60c16c802f framework/rt_config: Fix typo in hotplug big.LITTLE RT Params 2018-01-18 16:16:45 +00:00
Sergei Trofimov
fbb1a125fd framework/target: fix caseless runtime params
Fix the setting of runtime parameters when the casing of the parameter in
the agenda does not match the "canonical" casing.

To make the writing of agendas easier, the casing of the parameters is
supposed to be ignored. To achieve this, parameter names are converted to
caseless_string type before they are looked up.

caseless_string's do not work with dicts. Both __contains__ (used for
the "in" operator) and __getitem__ (used for the [] operator) implement
hash-based look up, and it is not possible to have a caseless_string
match against multiple hashes to cover the different casing
possibilities.

So instead, iterate over the items in parameters dict, comparing the
caseless_string name to the key, and returning the value if it matches.
2018-01-11 11:04:25 +00:00
Sergei Trofimov
833c3dd0a0 framework/target: manager: use get_target_description
use the new get_target_description() when initializing the target inside
TargetManager, instead of manually searching through results of
list_target_descriptions().
2017-12-15 17:07:34 +00:00
Sergei Trofimov
d11165b703 framework/target: add get_target_descriptor()
Add a function to get a TargetDescriptor by its name.
2017-12-15 17:07:34 +00:00
Sergei Trofimov
0a67e94709 framework/target: rename get_target_descriptions
Rename get_target_descriptions to list_target_descriptions.
2017-12-15 17:07:34 +00:00
Marc Bonnici
7bd99637c1 Target/AndroidAssistant: Try to disable selinux
If the target is rooted, attempt to disable selinux as this can cause
issues during runtime.
2017-12-14 17:56:29 +00:00
Marc Bonnici
103368415b target/descriptor: Fix sudo_cmd parameter description 2017-12-14 09:50:26 +00:00
Sergei Trofimov
bb9f735cd4 framework/target: assistant: fix import
Import Parameter from the module that defines it rather than from wa to
avoid circular import errors.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
3ab0aa04de framework/target: fix TargetInfo deserialization
Fix TargetInfo.from_pod(). As part of creating the POD, some of devlib's
classes such as Cpuinfo, get serialized. Since they are from devlib,
they do not implement WA's serialization interface, and are instead
serialized by extracting their internal structures. They are then not
deserialized properly, since their __init__'s expect text rather than
parsed structures.

This implements deserialization functions for these classes which
initialize them properly from TargetInfo POD.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
ed691a5335 framework/target: add shell_prompt target param.
Add a Parameter to specify a regex that matches the shell prompt on the
target. This used in establishing serial tty connections (e.g. VExpress
UART).
2017-12-12 10:07:04 +00:00
Brendan Jackman
aa2abd16a3 Run autoflake to remove unused imports & variables 2017-12-07 15:37:49 +00:00
Sergei Trofimov
0778766c8b framework/target: add adb_name alias
Add "adb_name" alias for "device" parameter of AdbConnection in order to
be backwards-compatible with WA2.
2017-11-29 13:19:39 +00:00
Sergei Trofimov
31e08bf797 framework/target: handle aliases
- Use get_config_point_map() to ensure aliases are parsed from
  configuraiton.
- Only set the default for a name only if it matches the corresponding
  param's name (i.e. don't set for alises).
2017-11-29 13:19:39 +00:00
Quentin Perret
be18157223 framework/target: wait 20 sec for network to show up
Some targets need more than 5 seconds to re-connect to a wifi network
after disabling airplane mode. To fix that, poll for network up to 20
seconds and show a warning if unreachable.
2017-11-17 07:53:16 +00:00
Marc Bonnici
a289a21cbc Framework/RuntimeConfig: Fix crash if no idle states available. 2017-11-15 14:47:36 +00:00
setrofim
eb0f53c8f6 Merge pull request #519 from bjackman/requires-network
Add Workload.requires_network
2017-10-24 14:36:42 +01:00
Sergei Trofimov
4826f8f2f2 framework/target: fix generic "frequency" runtime param
The generic "frequency" runtime parameter was only being set when there
are common frequences between avialable cores. It should always be set,
even if there are no frequencies in common, as it still valid to use it
with special values "min" and "max", in which case it should resolve
correctly to the appropriate frequencies.
2017-10-23 14:31:24 +01:00
Brendan Jackman
fbcee730b2 RTConfig: Allow network to stabilise after disabling airplane mode
This enables you to do things like:

global:
  runtime_parameters:
    airplane_mode: true # This improves repeatability of energy measurements

workloads:
  - name: foo

  - name: bar

  - name: geekbench
    runtime_parameters:
      airplane_mode: false # Geekbench requires network, and we don't care
                           # about energy for that workload anyway
2017-10-18 12:40:36 +01:00
Sergei Trofimov
5ecc4703e4 framework/execution: fix TargetManager termination
- Make sure TargetManager.finalize() actually gets called at the end
  of the run.
- Overrule the "diconnect" parameter behavior for gem5 and make sure it
  always disconnects. This necessary for stats to be generated properly.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
c89e249732 framework/target: add ability to pass additional platform params.
Gem5Platform requires a host output directory as one if it's
instantiation parameters. This is not something we want to expose a
configuration parameter to the user, as for WA, the standard output
directory ought to be used.

Up to this point, WA's target instatiation process assumed that all
parameters came from the user, and there was no way for WA itself to set
them. This commit adds extra_platform_parms argument to
instantiate_target, to remedi this.

extra_platform_parms is then used to set the host output directory for
gem5 appropriately.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
55a72002ca framework/target: fix gem5 target descriptor
(linux|android)_gem5 devices were being described as having gem5
platforms but standard linux/android connections. This commit fixes this
by making sure that the gem5 connection is used.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
bce66f4388 framework/target: fix runtime param name resolution
Runtime param names from config were matched against names available on
for the target using an overly-loose regex that resulted in the wrong
config point being returned.

Use caseless_string matching instead.
2017-10-06 14:21:23 +01:00
Brendan Jackman
f767714cd4 target/descriptor: Fix typo for 'telnet' param 2017-10-05 13:27:08 +01:00