dependencies

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 16 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.

View Source
const RulesFuzzingSHA256 = "4beab98d88e4bf2d04da0412d413a1364f95e5eb88963e15e603bee1410fcedf"

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

`)
View Source
var RulesFuzzingHTTPArchiveRule = fmt.Sprintf(`http_archive(
        name = "rules_fuzzing",
        sha256 = "%s",
        strip_prefix = "rules_fuzzing-ca617e846d0f92e00a903903b0554ea9142e1132",
        urls = ["https://github.com/CodeIntelligenceTesting/rules_fuzzing/archive/ca617e846d0f92e00a903903b0554ea9142e1132.tar.gz"],
    )`, RulesFuzzingSHA256)

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 (
	Bazel          Key = "bazel"
	Clang          Key = "clang"
	CMake          Key = "cmake"
	LLVMCov        Key = "llvm-cov"
	LLVMSymbolizer Key = "llvm-symbolizer"
	LLVMProfData   Key = "llvm-profdata"

	GenHTML Key = "genhtml"

	Java   Key = "java"
	Maven  Key = "mvn"
	Gradle Key = "gradle"

	VisualStudio Key = "Visual Studio"

	MessageVersion = "cifuzz requires %s %s or higher, have %s"
	MessageMissing = "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