Add dependency checks for TFS.
Review Request #12554 — Created Aug. 19, 2022 and submitted — Latest diff uploaded
TFSClientto add formal support for dependency checks.
Unlike most other SCM updates, this one's a bit more complicated due to
the three wrapper classes that can be chosen.
The wrapper classes now all inherit from a base class, which defines the
interface for wrappers. They then override their own
check_dependencies(), performing the checks that used to be done in
TFSClienthas been updated to check each wrapper in order, selecting
one that passes dependency checks, or failing with a hopefully helpful
error listing broad dependencies.
That has the added benefit of now allowing a fallback to TEE when the TF
Helper is installed but Java is not.
tf_wrapperattribute is now a property, which enforces a
dependency check, emitting a warning if dependencies haven't already
been checked via
has_dependencies(). All methods on
TFSClientgo through this already, ensuring this is used.
There weren't any TFS unit tests before. This change adds the first
ones, which are all focused on the variety of dependency checks.
Unit tests pass on Python 3.7-3.11.