dependencies

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CIFuzzBazelCommit = "b013aa0f90fe8ac60adfc6d9640a9cfa451dda9e"

CIFuzzBazelCommit is the commit of the https://github.com/CodeIntelligenceTesting/cifuzz-bazel repository that is required by this version of cifuzz.

Keep in sync with examples/bazel/WORKSPACE.

Variables

View Source
var ErrDeps = errors.New(`Unable to run command due to missing/invalid dependencies.
For installation instruction see:

	https://github.com/CodeIntelligenceTesting/cifuzz#installation

`)

Functions

func Check

func Check(keys []Key) error

Check iterates of a list of dependencies and checks if they are fulfilled

func ClangVersion added in v0.5.0

func ClangVersion(path string) (*semver.Version, error)

ClangVersion returns the version of the clang/clang++ executable at the given path.

func MockAllDeps added in v0.12.0

func MockAllDeps(t *testing.T)

MockAllDeps marks all the dependencies of this package as installed in the right version

func OverwriteGetVersionWith0

func OverwriteGetVersionWith0(dep *Dependency) *semver.Version

OverwriteGetVersionWith0 marks the specified dependency as installed in version 0.0.0

func OverwriteUninstalled added in v0.12.0

func OverwriteUninstalled(dep *Dependency)

OverwriteUninstalled marks the specified dependency as uninstalled

Types

type Dependencies

type Dependencies map[Key]*Dependency

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 GetDep added in v0.12.0

func GetDep(key Key) *Dependency

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"

	GENHTML Key = "genhtml"

	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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL