Documentation ¶
Index ¶
- func Check(keys []Key, deps Dependencies, finder runfiles.RunfilesFinder) (bool, error)
- func ClangVersion(path string) (*semver.Version, error)
- func Error() error
- func OverwriteGetVersionWith0(dep *Dependency) *semver.Version
- func OverwriteInstalledWithFalse(dep *Dependency)
- func ResetDefaultsForTestsOnly()
- type Dependencies
- type Dependency
- type Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(keys []Key, deps Dependencies, finder runfiles.RunfilesFinder) (bool, error)
Iterates of a list of dependencies and checks if they are fulfilled
func ClangVersion ¶ added in v0.5.0
ClangVersion returns the version of the clang/clang++ executable at the given path.
func OverwriteGetVersionWith0 ¶
func OverwriteGetVersionWith0(dep *Dependency) *semver.Version
Replaces the `GetVersion` function with one that returns version 0.0.0
func OverwriteInstalledWithFalse ¶
func OverwriteInstalledWithFalse(dep *Dependency)
Replaces the `Installed` function with one that returns false
func ResetDefaultsForTestsOnly ¶
func ResetDefaultsForTestsOnly()
Types ¶
type Dependencies ¶
type Dependencies map[Key]*Dependency
var CMakeDeps Dependencies
var GradleDeps Dependencies
var MavenDeps Dependencies
func CreateTestDeps ¶
func CreateTestDeps(t *testing.T, keys []Key) Dependencies
Creates a set of dependency mocks all dependcies are marked as "installed" and are present in just the right version by default
type Dependency ¶
type Dependency struct { Key Key MinVersion semver.Version // these fields are used to implement custom logic to // retrieve version or installation information for the // specific dependency GetVersion func(*Dependency) (*semver.Version, error) Installed func(*Dependency) bool // contains filtered or unexported fields }
Dependency represents a single dependency
func (*Dependency) CheckVersion ¶
func (dep *Dependency) CheckVersion() bool
Compares MinVersion against GetVersion
func (*Dependency) Ok ¶
func (dep *Dependency) Ok() bool
type Key ¶
type Key string
const ( CLANG Key = "clang" CMAKE Key = "cmake" LLVM_COV Key = "llvm-cov" LLVM_SYMBOLIZER Key = "llvm-symbolizer" LLVM_PROFDATA Key = "llvm-profdata" JAVA Key = "java" MAVEN Key = "mvn" GRADLE Key = "gradle" MESSAGE_VERSION = "cifuzz requires %s %s or higher, have %s" MESSAGE_MISSING = "cifuzz requires %s, but it is not installed" )
Click to show internal directories.
Click to hide internal directories.