Documentation ¶
Index ¶
- Variables
- func AddAdditionalFilesFlag(cmd *cobra.Command) func()
- func AddBranchFlag(cmd *cobra.Command) func()
- func AddBuildCommandFlag(cmd *cobra.Command) func()
- func AddBuildJobsFlag(cmd *cobra.Command) func()
- func AddBuildOnlyFlag(cmd *cobra.Command) func()
- func AddCleanCommandFlag(cmd *cobra.Command) func()
- func AddCommitFlag(cmd *cobra.Command) func()
- func AddDictFlag(cmd *cobra.Command) func()
- func AddDockerImageFlag(cmd *cobra.Command) func()
- func AddEngineArgFlag(cmd *cobra.Command) func()
- func AddEnvFlag(cmd *cobra.Command) func()
- func AddFlags(cmd *cobra.Command, funcs ...func(cmd *cobra.Command) func()) (bindFlags func())
- func AddInteractiveFlag(cmd *cobra.Command) func()
- func AddPresetFlag(cmd *cobra.Command) func()
- func AddPrintJSONFlag(cmd *cobra.Command) func()
- func AddProjectDirFlag(cmd *cobra.Command) func()
- func AddProjectFlag(cmd *cobra.Command) func()
- func AddResolveSourceFileFlag(cmd *cobra.Command) func()
- func AddSeedCorpusFlag(cmd *cobra.Command) func()
- func AddServerFlag(cmd *cobra.Command) func()
- func AddTimeoutFlag(cmd *cobra.Command) func()
- func AddUseSandboxFlag(cmd *cobra.Command) func()
- func BuildOutputToFile(projectDir string, fuzzTestNames []string) (io.Writer, error)
- func Chdir() error
- func ConstructJVMFuzzTestIdentifier(path, testDir string) (string, error)
- func DisableConfigCheck(cmd *cobra.Command)
- func EvaluateBazelTargetPatterns(patterns []string) ([]string, error)
- func ExecuteCommand(t *testing.T, cmd *cobra.Command, in io.Reader, args ...string) (string, error)
- func GetMsgPathToBuildLog() string
- func GetTargetMethodsFromJVMFuzzTestFile(path string) ([]string, error)
- func JazzerGeneratedCorpus(targetClass string, projectDir string) string
- func JazzerSeedCorpus(targetClass string, projectDir string) string
- func ListJVMFuzzTests(projectDir string) ([]string, error)
- func ListJVMFuzzTestsWithFilter(projectDir string, prefixFilter string) ([]string, error)
- func MarkFlagsRequired(cmd *cobra.Command, flags ...string)
- func NeedsConfig(cmd *cobra.Command) bool
- func PrintBuildLogOnStdout() error
- func ShouldLogBuildToFile() bool
- func ValidateSeedCorpusDirs(seedCorpusDirs []string) ([]string, error)
- func ViperMustBindPFlag(key string, flag *pflag.Flag)
- func WrapCouldBeSandboxError(err error) error
- func WrapExecError(err error, cmd *exec.Cmd) error
- func WrapIncorrectUsageError(err error) error
- func WrapSilentError(err error) error
- type CouldBeSandboxError
- type ExecError
- type IncorrectUsageError
- type SignalError
- type SilentError
Constants ¶
This section is empty.
Variables ¶
var BundleFlags = []string{
"branch",
"build-command",
"build-jobs",
"commit",
"dict",
"docker-image",
"engine-arg",
"env",
"seed-corpus",
"timeout",
}
var ErrSilent = WrapSilentError(stdErrors.New("SilentError"))
Functions ¶
func AddAdditionalFilesFlag ¶ added in v0.23.0
func AddBranchFlag ¶ added in v0.5.0
func AddBuildCommandFlag ¶ added in v0.5.0
func AddBuildJobsFlag ¶ added in v0.5.0
func AddBuildOnlyFlag ¶ added in v0.12.0
func AddCleanCommandFlag ¶ added in v0.20.0
func AddCommitFlag ¶ added in v0.5.0
func AddDictFlag ¶ added in v0.5.0
func AddDockerImageFlag ¶ added in v0.5.0
func AddEngineArgFlag ¶ added in v0.5.0
func AddEnvFlag ¶ added in v0.5.0
func AddFlags ¶ added in v0.5.0
AddFlags executes the specified Add*Flag functions and returns a function which binds all those flags to viper
func AddInteractiveFlag ¶ added in v0.6.0
func AddPresetFlag ¶ added in v0.12.0
func AddPrintJSONFlag ¶ added in v0.5.0
func AddProjectDirFlag ¶ added in v0.5.0
func AddProjectFlag ¶ added in v0.13.0
func AddResolveSourceFileFlag ¶ added in v0.15.0
func AddSeedCorpusFlag ¶ added in v0.5.0
func AddServerFlag ¶ added in v0.13.0
func AddTimeoutFlag ¶ added in v0.5.0
func AddUseSandboxFlag ¶ added in v0.5.0
func BuildOutputToFile ¶ added in v0.18.0
func ConstructJVMFuzzTestIdentifier ¶ added in v0.19.0
ConstructJVMFuzzTestIdentifier constructs a fully qualified class name for a given fuzz test file from the directory the file is in and the file name.
func DisableConfigCheck ¶
func EvaluateBazelTargetPatterns ¶ added in v0.5.0
func ExecuteCommand ¶
func GetMsgPathToBuildLog ¶ added in v0.18.0
func GetMsgPathToBuildLog() string
func GetTargetMethodsFromJVMFuzzTestFile ¶ added in v0.22.0
GetTargetMethodsFromJVMFuzzTestFile returns a list of target methods from a given fuzz test file.
func JazzerGeneratedCorpus ¶ added in v0.15.0
func JazzerSeedCorpus ¶ added in v0.15.0
func ListJVMFuzzTests ¶ added in v0.19.0
ListJVMFuzzTests returns a list of all fuzz tests in the project. The returned list contains the fully qualified class name of the fuzz test.
func ListJVMFuzzTestsWithFilter ¶ added in v0.19.0
ListJVMFuzzTestsWithFilter returns a list of all fuzz tests in the project. The returned list contains the fully qualified class name of the fuzz test. to filter files based on the fqcn you can use the prefix filter parameter
func MarkFlagsRequired ¶
func NeedsConfig ¶
func PrintBuildLogOnStdout ¶ added in v0.18.0
func PrintBuildLogOnStdout() error
PrintBuildLogOnStdout reads the build log file and prints it on stdout.
func ShouldLogBuildToFile ¶ added in v0.18.0
func ShouldLogBuildToFile() bool
func ValidateSeedCorpusDirs ¶
ValidateSeedCorpusDirs checks if the seed dirs exist and can be accessed and ensures that the paths are absolute
func ViperMustBindPFlag ¶
func WrapCouldBeSandboxError ¶
WrapCouldBeSandboxError wraps an existing error into a CouldBeSandboxError to hint on disabling the sandbox when the error is handled.
func WrapExecError ¶
WrapExecError wraps an existing error into an ExecError to include information about the exec.Cmd which failed in the error message.
func WrapIncorrectUsageError ¶
WrapIncorrectUsageError wraps an existing error into a IncorrectUsageError to have the usage message printed when the error is handled.
func WrapSilentError ¶
WrapSilentError wraps an existing error into a SilentError to avoid having the error message printed when the error is handled.
Types ¶
type CouldBeSandboxError ¶
type CouldBeSandboxError struct {
// contains filtered or unexported fields
}
CouldBeSandboxError indicates that the error might have been caused by the sandbox restricting access. When a CouldBeSandboxError is handled, a message should be printed which suggests to disable the sandbox if its not needed.
func (CouldBeSandboxError) Error ¶
func (e CouldBeSandboxError) Error() string
func (CouldBeSandboxError) Unwrap ¶
func (e CouldBeSandboxError) Unwrap() error
type ExecError ¶
type ExecError struct {
// contains filtered or unexported fields
}
ExecError includes information about the exec.Cmd which failed in the error message.
type IncorrectUsageError ¶
type IncorrectUsageError struct {
// contains filtered or unexported fields
}
IncorrectUsageError indicates that the command wasn't used correctly, for example because required arguments are missing. When an IncorrectUsageError is handled, the usage message should be printed.
func (IncorrectUsageError) Error ¶
func (e IncorrectUsageError) Error() string
func (IncorrectUsageError) Unwrap ¶
func (e IncorrectUsageError) Unwrap() error
type SignalError ¶
func NewSignalError ¶
func NewSignalError(signal syscall.Signal) *SignalError
func (SignalError) Error ¶
func (e SignalError) Error() string
type SilentError ¶
type SilentError struct {
// contains filtered or unexported fields
}
SilentError indicates that the error message should not be printed when the error is handled.
func (SilentError) Error ¶
func (e SilentError) Error() string
func (SilentError) Unwrap ¶
func (e SilentError) Unwrap() error