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.
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.
- Use indentcontext inside initialize_run to make sure log level
is dedented on error.
- Ensure Executor postamble always runs, event if runner errors.
- Fix format_duration() to handle sub-second timedeltas.
Add a function to return WA version suffixed with the commit hash for
current HEAD. This only works if WA was deployed via
python setup.py develop
otherwise, the output is identical to get_wa_version().
When scanning modules for plugins, only consider classes defined in that
module, but not those imported into it. This will prevent log output
being polluted with repeated "Skipping..." messages for imported plugin
bases.
Move the logging of the WA version and command line used to invoke it
from run command into main() inside entrypoint. That way, these will be
the first entries in the log file, now that early log records are no
longer lost.
If more then one of augmentation entries ("augmentations",
"instrumenatation", "output_processors") is specified in the same
config they were being merged into a single entry.
This can cause issues with '~~' (drop everything glyph) being "resolved"
during this merge and therefore not actually used to drop all previous
augmentations.
Union'ing, instead of merging, configs at the same level avoids that.
Note that this is semantically correct, as we're not enforcing
precedence at the same level of config, so merge semantics do not apply.
Add support for "~~" special value that indicates that, when merging
into another set, all values from that set should in fact be dropped.
Apart from the unique merge semantics, "~~" just like any other "~"
value.
Delay the split of augmentations into instruments and output processors
until they are actually being accessed; keep them as a single set until
then. This makes tracking of merges from various configurations sources
easier
If WA is ran without any workloads being specified, previously an index
error was thrown, now check that at least one global workload has been
specified and if not, provide a more helpful error message.
Add extra_plugin_paths setting which gets populated from WA_PLUGIN_PATHS
environment variable. This allows specifying additional locations to
scan for WA plugins.
The `install_timeout` variable is used to allow extra time when
installing an apk, if the apk is not present on the host system it
will be pulled back to the host, therefore we should allow extra time
when transferring the file in the other direction as well.
If the http getter is used but a connection is not avalible, when
attempting to fetch the resource index an error will be raised. Now we
ignore the error allowing for the remaining getters to be used.
Ensure that boot and runtime parameters always get initialized to an
obj_dict even when not explicitly specified. This will ensure they get
serialized and deserialized properly.
Catch exceptions raised when attempting to set value of a config point,
and re-raise as ConfigError with name associated with the value in the
config file.
Now allows a `prefer_host_package` parameter to be set to control
whether a package located on the host system (`True`) or on the target
(`False`) should be favoured during resolution.
`pull_apk` now returns the path to the apk it pulled from the device so
WA can keep track of it and avoid conflicts with other apks present
on the host.
Upon initilisation WA3 will now also check if a WA3 config file
exisits, rather than just the exsistance of the config directory.
If a `config.yaml` file is not found WA will look for a WA2 config.py
file and convert it to the new format, otherwise a default config file
will be generated.
Record UI state if an error occurs during setup, run, and output
processing stages (for other stages, the UI state is unlikely to be
relevant as they typically would not include UI manipulation).
Only run finalize() for a job if initialize has succeed. finalize()
should be able to assume that initialize() has succeed, without needing
to check that that file have been created, variables set, etc.