we need to return to prev_dir before calculating the
base path for the templates otherwise we are looking for the
templates in the wrong directory (and fail).
This allows uaudit to be called with a relative path from any path.
uaudit: skip report generation when output is not txt
Some tools don't support JSON output and are causing jira/review/bug
report generation from the templates to fail since some keys are missing.
Skipping the report generation when certain required tools for the report
haven't been run makes sense in those cases.
Also generalize the above so that when JSON-only output is requested,
uaudit steps that output txt will be skipped. These are:
- static analyzers that don't have JSON support yet
- all of our custom audit-* tools
the idea is that when JSON-only output is requested, the output of these
other tools, which is not used, is not slowing down the report generation.
umt testflinger: only query c3 API for known testflinger machines
The c3 API allows to query for a list of IDs so ask it only for those which we
have looked up previously from testflinger. This saves a lot of unnecessary
queries.
umt: supplement testflinger queues with c3 machine descriptions
certification.canonical.com (c3) stores details on all the various machines that
have been tested by the Devices Certification team. This includes most of the
machines in the testflinger queues - some of which do not have any description
listed. So fetch this information from the c3 API and augment the list of
testflinger queues with it.
build-tools/umt: ensure binaries installed if using skeleton qrt test
The skeleton.py QRT script doesn't specify any QRT-Packages and so the packages
under test may never get installed at all since later steps always run apt with
--only-upgrade which then only will upgrade the package if it is already
installed. Instead, edit this in place on the VM so that it installs all the
binary packages built by the current source package.