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

147 Commits

Author SHA1 Message Date
Brendan Jackman
2cd0c1a3f1 framework/config: Fix JobSpec.from_pod 2017-11-06 16:11:54 +00:00
Sergei Trofimov
95e9d14f9d framework/resource: clearer file and exe strings
Update the File and Executable resource string representations to
actually include the words "file" and "executable" respectively to make
messages containing these representations (e.g. when a resource is not
found) clearer.
2017-11-03 17:33:54 +00:00
Sergei Trofimov
00d1d3d318 commands/run: update "--disable" option
--diable can now be used to disable both intruments and
result_processors from the command line (overriding configuration
files). Rename variable names to reflect this.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
836ba1505f framework/config: properly update augmentations inside JobGenerator
Replace update_enabled_instruments with update_augmentations, which
correctly splits instruments and results processors from augmentations
configuration values.

While instruments and processors are now handled uniformly in
configuration, they still need to be handled differently during actual
execution. This is the point where they get split again.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
e3d74fcd21 framework/config: fix augmentations merging
Remllace merge_instruments_result_processors with merge_agumentations
which is updated to properly merge the new unified "augmentations"
configurations.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
4f8bd00fe2 framework/config: add eanbled processor tracking to JobGenerator
Add attributes for tracking enabled processors to JobGenerator (similiar
to what already exists for instruments).
2017-11-03 17:33:32 +00:00
Sergei Trofimov
337c5e5e1d framework/config: rename instrumenation --> augmentations
Rename ConfigurationPoint "instrumenation" to "augmentations". Unlike
WA2, in W3, instruments and result_porcessors are handled identically in
configuration (though there're still distinct pulgin types).
"instrumentation" and "result_porcessors" entries in configuration are
now aliases for the same configuration point, which is renamed to
"augmentations" to reflect the fact that it contains both types of
plugins.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
f5cc58d847 framework/config: add get_plugin_class to PluginCache
Expose PluginLoader's get_plugin_class via PluginCache. PluginCache is
basically intented to act like a PluginLoader, except when instantiating
plugins, the "default" parameter values are taken form the cached
configruation, rather than the actual defaults defined in the Plugin's
parmaters.
2017-11-03 17:33:32 +00:00
Brendan Jackman
bf14242c74 framework/signal: Fix typos 2017-11-03 14:07:44 +00:00
Brendan Jackman
47e9b95d4d framework/signal: Whitespace 2017-11-03 14:07:44 +00:00
setrofim
eb0f53c8f6 Merge pull request #519 from bjackman/requires-network
Add Workload.requires_network
2017-10-24 14:36:42 +01:00
setrofim
829ac73f06 Merge pull request #525 from setrofim/next
Fixes.
2017-10-23 18:04:25 +01:00
Brendan Jackman
9fa1b133dc framework: Add bail_on_init_failure run configuration
This maintains the default behaviour of bailing out immediately if any workload
fails in initialize(), but adds a setting, bail_on_init_failure, to change this
behaviour optionally. This can be useful where WA is being used more as a batch
processor.
2017-10-23 16:44:49 +01:00
Brendan Jackman
4a001713bb framework/execution: Factor out skip_job method
This also fixes the missing housekeeping when skipping a job due to phones_home
2017-10-23 16:44:49 +01:00
Sergei Trofimov
890428dbf6 framework/execution: fix end of run status reporting
Changes to the Status enum introduced by 31a535b5 and a9959550 broke
ran Jobs summary status at the end of the run. This fixes it so that the
total number of jobs and individual status counts are reported
correctly.
2017-10-23 14:31:24 +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
Sergei Trofimov
8dd1e6636c framework: set context for loggers
Set context for the loggers of the Runner, the workloads and the
installed instruments and processors. Errors/warnings logged by these
entities will be automatically added as events.
2017-10-23 12:28:49 +01:00
Brendan Jackman
138ed1495e framework/job: Include job iteration in log messages 2017-10-19 16:28:43 +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
Brendan Jackman
71815e4e1c framework/workload: Implement Workload.requires_network attribute 2017-10-18 11:50:29 +01:00
Sergei Trofimov
1daec4f2c5 framework/getters: fix http getter APK resolution
Fully matching an APK resource requires the file to be present locally,
so that its metadata can be queries. HTTP getter was matching against a
remote path so the match was failing.

The matching now happens in two stages == first partial path-only
matches are established. Secondly, all partial matches are downloaded
and final match occurs against downloaded files.
2017-10-10 13:14:07 +01:00
Sergei Trofimov
5f7c64b089 framework/resource: add match_path method
This method is used to partially match a resource; its implementation
cannot rely on the resource file actually being present and must match
against the specified path alone.

match() implementation now defaults to match_path(), as for most
resource types, the path is sufficient to uniquely match a resource.
2017-10-10 11:39:53 +01:00
setrofim
c3438b6814 Merge pull request #500 from setrofim/next
memcopy workload + fix gem5 support.
2017-10-10 08:58:24 +01:00
setrofim
590309b6be Merge pull request #508 from bjackman/instrumentation-typo
instrumentation: Fix typo
2017-10-10 08:40:25 +01:00
Brendan Jackman
049e2df0dc instrumentation: Fix typo 2017-10-09 18:26:41 +01:00
Brendan Jackman
016d68bfa0 PluginCache: Improve error message for ill-formed plugin config
Currently if you get confused and write a config with something like:

energy_measurement:
  acme_cape

Then you get an error when we try to 'iteritems' on the value
'acme_cape'. Instead, explicitly check for this case.
2017-10-06 18:00:38 +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
Sergei Trofimov
7d9b6d6dd7 framework/config: ensure correct type for param defaults
Call self.kind() on the default value of a parameter before assigning it
to make sure that the assigned value is of correct type.
2017-10-06 12:52:57 +01:00
Sergei Trofimov
6e0cb73a4e framework/config: make LoggingConfig serializable 2017-10-06 12:52:12 +01:00
Brendan Jackman
f767714cd4 target/descriptor: Fix typo for 'telnet' param 2017-10-05 13:27:08 +01:00
setrofim
85d23421b9 Merge pull request #497 from bjackman/phone-home
Add feature to mark workloads unsafe for confidential devices
2017-10-04 15:57:41 +01:00
Brendan Jackman
06b451d31b framework: Add feature to mark workloads unsafe for confidential devices
Some workloads, such as Geekbench, may phone home and report data about the
device they are running on. This poses a risk for users that are testing on
unreleased or otherwise confidential devices - perhaps they use a standard
agenda to run a large battery of tests, in which case they may forget to disable
these dangerous workloads.

This provides a mechanism to prevent running those workloads from running by
setting allow_phone_home=False in the user configuration.
2017-10-04 15:43:03 +01:00
Brendan Jackman
90e4cace06 target/descriptor: Add 'to false' to load_default_modules description 2017-10-04 15:42:18 +01:00
Brendan Jackman
188e5d752f framework/execution: Whitespace 2017-10-04 13:35:20 +01:00
Brendan Jackman
c4fe5b66e5 target/descriptor: Fix 'devlib' typo 2017-10-04 13:30:12 +01:00
Brendan Jackman
24dc8b2a65 target/descriptor: whitespace 2017-10-04 13:30:10 +01:00
Brendan Jackman
43f5cd793a PluginCache: Check plugin name before trying to iteritems
Currently if your config contains

typo_for_a_global_alias: 1

You will get an error where we try to call 'iteritems' on the value 1. This
commit re-orders the checks so that you instead get an error for the
unrecognised 'typo_for_a_global_alias'.
2017-10-04 13:28:53 +01:00
Brendan Jackman
8daae0752e PluginCache: whitespace 2017-10-04 13:28:52 +01:00
Marc Bonnici
3b7af8e52c Uiautomator: Adds missing support functionality
Adds initial implementation of ActionLogger class and adds method to
BaseUiAutomation to automatically generate packageID.
2017-10-03 11:12:22 +01:00
Brendan Jackman
e5f13076ac BaseUiAutomation: Port uiDeviceSwipe methods from WA2 2017-10-02 16:17:36 +01:00
Sergei Trofimov
9cb7ea862c framework/workload: default view for ApkWorkload
- Add "activity" property to PackageManager exposing the underlying
  apk_info attribute.
- Add "view" class attribute to ApkWorkload, initialized to None
- If "view" is not set for a particular workload, set a default based on
  the package and activity of the underlying workload.
2017-09-29 14:22:22 +01:00
Sergei Trofimov
9d7f998511 framework/instrumentation: handle non-job errors in ManagedCallback
If an error occurs in a ManagedCallback that is invoked outside of a
job, re-raise rather than attempting to update the status of the
non-existent job.
2017-09-27 10:34:50 +01:00
Sergei Trofimov
0934037e1b revent fixes
- do not attempt to replay setup if a setup recording has not been
  provided (perviously, setup was mandatory).
- update the apk initialization to the correct method inside the record
  command.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
261417a9db framework/configuration: fix workload config with multiple sections
When an agenda contains multiple sections, the same workload entry might
be used in construction of multiple job specs. Job spec construction may
mangle the workload entry. To prevent this from impacting other
jobs, use a deep copy of the workload entry when constructing a job
spec.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
c96181bed7 framework/configruation: fix mandatory workload parameters
PluginCache.get_plugin_config assumes that no more configuration is to
be processed, and therefore config is final. As such, it is validating
that mandatory parameters are set. This assumption is invalid for
workload_parameters, however, as those need to be resolved on per-spec
basis, and cannot be globally cached.

This commit adds a prameter for get_plugin_config that indicates whether
or not it should consider the config to be final.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
aec89a077e framework/configuration: fix connection_settings configuration
Connection settings were not being properly extracted from device_config
and not used. Meaning it was impossible to e.g. specify the adb device
to use for a run.

This ensures that connection settings are extracted, validated, and used
properly.
2017-09-27 10:32:31 +01:00
Sergei Trofimov
04d5ec4277 framework/run: fix JobState deserialization
At some point, JobState __init__ was changed to take the iteration
number, but its from_pod was not updated accordingly.
2017-09-27 10:32:31 +01:00