Make TargetInfo an attribute of run output, replacing the read/write
methods for the targetfile. Instead, always load it on creation, if
targetfile exists (useful for external scripts), and have a method to
set it after creation (uselful during WA run, where the output is
created before connecting to the target).
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.
Fix output when running for a specified number of loops (rather than
duration) and adding delay to threads. Previously, the output for the
last thread was not printed due to a missing check for a negative
duration.
Don't construct an ArtifactType in Output.Add_artifact, the Artifact
class does that for us.
Next, fix the use of a nonexistent attribute Artifact.valid_kinds
This warns for stuff like this, where the else is unnecessary:
if thing:
return 1
else:
return 2
Which is harmless. Some people even prefer it that way.
Previously only the top level help message would ever be displayed,
this was caused by 'parse_known_commands' automatically displaying the
default help message and exiting before any of the custom plugins are
loaded. Now ensure this flag is never passed into the method.
Remove wa.framework.plugin.Artifact and associated references. The name
of the class clashes with the class from output and can potentially
cause confusion.
The original intention for this was to be an "expected artifact
descriptor" of sorts that plugins can specify for validation purposes,
but that functionality was never implemented. Given that the framework
has undergone significant changes since this was implemented, it's not
clear that this is the best way to go about the original goal.
Therefore remove this for now.
To reflect that the current implementation of ReventWorkload uses an APK
file on the device the name has been changed appropriately and the
relevant workloads have been updated.