This is WA2 sqlite result processor ported to WA3 output processor API.
It is schema-compatible with the WA2 version (in fact, there are *no*
schema changes).
Note: There is a medium-term goal of adding a more generic SQL database
exporter with a more complete schema sitting on top of something like
sqlalchemy to make it agnostic of DBMS implementations. At point, this
will likely be deprecated.
With this commit we add a Dockerfile which can be used to create a
Docker image for running WA and devlib. Users are able to use this
image in a Docker container to run workloads on devices, without
requiring WA on their host systems. Please be aware that udev rules
must still be correctly setup on the host.
NOTE: This Dockerfile will accept the Android SDK licenses
automatically.
Update the 'package' argument description to specify it is for android
packages and add error checking to ensure that if specified, the target
supports android.
Change the recording of the run stage during workload recording mode to be
optional as the user may want to use the command to re-record a specific
stage of a workload without affecting the workload recording.
Hitting CTRL-C will abort execution of the current job, but will still
trigger run finalization, and possibly, post-processing and teardown of
the current job. If an exception is raised during this
post-process/teardown, the previous exception state (for the
KeybardInterrupt) will be clobbered. That means that, after the new
exception has been handled, WA would attempt to execute the next job,
rather than go to finalization of the run.
To avoid this, set a flag in the context upon catching KeybardInterrupt,
and check this flag before attempting to execute the next job in the
queue.
Rather than relying on a custom Logger with a context to add events when
they are logged, have the runner register hooks for corresponding
signals that do that.
The issue with the previous approach is that the event ended up
being added too late -- after the current job was already cleared, so
all events were added at run level.
With the new approach, the event will be added when it is first logged,
while there is still a current job being set. There will be no
duplication for Exceptions being re-raised and handled at different
levels because log_error() will ensure that each Exception is logged
only once.
- 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.
- 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
- Keep track of logged exceptions inside log_error itself.
- signal: log the exception, if there is one in the finally clause of
the signal wrapper; this will ensure that the error will be logged
closer to the command that originated.
- entrypoint: use log.log_error for top-level error logging, rather than
the entrypoint logger directly; this will ensure that errors are not
repeated unnecessarily.
- Log CTRL-C message at zeroth indent level to make it easier to see in
the non-verbose output where it occurred.
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.
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.
We remove the requirement for rt-app to run on a rooted device as this
does not appear to be required. We make sure that we run the workload
from a directory where we have write permissions by first changing the
directory before executing the workload (in_directory argument of
invoke).
In the case that the device is rooted, we run rt-app as
root. Otherwise, we simply run the workload.
By default rt-app writes to stderr, not to stdout. Therefore, if we
only sample the stdout, we get no output from the workload itself.
With this change, we redirect stderr to stdout to allow us to get the
workload output.
ExecutionContext.end_run() does final updates to the run info in the run
output (final status, run duration, etc). This was previously accessed
via self.output in the context. Typically, this would correctly resolve
to the run output, as there would be no current job. However, in the
event of a crash, current_job would be set, and this would resolve to
the job output itself, resulting in run info not being updated. Use
run_output to avoid this.
Fix the field descriptions for replay event to reflect the correct
signedness and size.
(note: the layout diagrams were already correct, just the textual
descriptions needed to be adjusted)
- RebootPolicy: correctly handle being passed another instance of
RebootPolicy on creation; this a requirement for it to be usable as a
ConfigurationPoint kind.
- RebootPolicy: move static method to above __init__ (consistency).
- RunConfiguration: handle deserialization of 'device_config' entry.
- RunConfiguration: move static method to above __init__ (consistency).
Save classifiers at Result as well as Metric level. Reason: when
processing output, one might want to filter complete results, as well as
individual metrics. While it is in theory possible to get the
classifiers for a job by simply extracting the common classifiers
between all metrics, this fails when there are no metrics generated for
a job (note that one might still want to process the output in this
case, e.g. for the artifacts).
Set target_binary as a class, rather than instance, attribute. This
happens only only once per run, and setting it as instance attribute the
first time, makes it unavailable for subsequent instances of the same
workload.