Documentation ¶
Index ¶
- func AddLinesToFileAtBreakPoint(t *testing.T, filePath string, linesToAdd []string, breakPoint string, ...)
- func AppendLines(t *testing.T, filePath string, linesToAdd []string)
- func CopyCustomTestdataDir(t *testing.T, dir, name string) string
- func CopyTestdataDir(t *testing.T, name string) string
- func CopyTestdataDirForE2E(t *testing.T, name string) string
- func FilterForInstructions(lines []string) []string
- func GetFindings(t *testing.T, cifuzz string, dir string) []*finding.Finding
- func InstallCIFuzzInTemp(t *testing.T) string
- func ModifyFuzzTestToCallFunction(t *testing.T, fuzzTestPath string)
- func TerminateOnSignal(t *testing.T, cmd *executil.Cmd)
- func TestAdditionalJazzerParameters(t *testing.T, cifuzz, dir string)
- func TestBundleGradle(t *testing.T, lang string, dir string, cifuzz string, args ...string)
- func TestBundleLibFuzzer(t *testing.T, dir string, cifuzz string, cifuzzEnv []string, args ...string)
- func TestBundleMaven(t *testing.T, dir string, cifuzz string, args ...string)
- func TestRemoteRun(t *testing.T, dir string, cifuzz string, args ...string)
- func TestRemoteRunWithAdditionalArgs(t *testing.T, dir string, cifuzz string, expectedErrorExp *regexp.Regexp, ...)
- func TestRunBundle(t *testing.T, dir string, cifuzz string, bundlePath string, cifuzzEnv []string, ...) (*archive.Metadata, string)
- func TestRunNotAuthenticated(t *testing.T, dir string, cifuzz string, args ...string)
- func TestRunWithUpload(t *testing.T, dir string, cifuzz string, args ...string)
- type CIFuzzRunner
- func (r *CIFuzzRunner) Command(t *testing.T, command string, opts *CommandOptions) []string
- func (r *CIFuzzRunner) CommandOutput(t *testing.T, command string, opts *CommandOptions) (string, string)
- func (r *CIFuzzRunner) CommandWithFilterForInstructions(t *testing.T, command string, opts *CommandOptions) []string
- func (r *CIFuzzRunner) Run(t *testing.T, opts *RunOptions)
- type CommandOptions
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLinesToFileAtBreakPoint ¶
func AddLinesToFileAtBreakPoint(t *testing.T, filePath string, linesToAdd []string, breakPoint string, addAfterBreakpoint bool)
AddLinesToFileAtBreakPoint adds the given lines before or after the breakpoint to the file at the given path.
func CopyCustomTestdataDir ¶ added in v0.31.0
CopyCustomTestdataDir copies a custom named testdata directory in the current working directory to a temporary directory called "cifuzz-<name>-testdata" and returns the path.
func CopyTestdataDir ¶
CopyTestdataDir copies the "testdata" folder in the current working directory to a temporary directory called "cifuzz-<name>-testdata" and returns the path.
func CopyTestdataDirForE2E ¶ added in v0.23.0
Used for e2e tests CopyTestdataDirForE2E copies a named folder from the samples directory to a temporary directory called "cifuzz-<name>-testdata" and returns the path.
func FilterForInstructions ¶ added in v0.20.0
func InstallCIFuzzInTemp ¶
InstallCIFuzzInTemp creates an installation builder and extracts it into a temporary directory. The temporary directory should *not* be deleted by the caller because it is shared between tests and deleting it would cause side effects.
func TestAdditionalJazzerParameters ¶ added in v0.27.0
func TestBundleGradle ¶ added in v0.12.0
func TestBundleLibFuzzer ¶ added in v0.12.0
func TestBundleMaven ¶ added in v0.12.0
func TestRemoteRunWithAdditionalArgs ¶ added in v0.22.0
func TestRunBundle ¶ added in v0.12.0
func TestRunNotAuthenticated ¶ added in v0.25.0
Types ¶
type CIFuzzRunner ¶
func (*CIFuzzRunner) Command ¶
func (r *CIFuzzRunner) Command(t *testing.T, command string, opts *CommandOptions) []string
Command runs "cifuzz <command> <args>" and returns stderr output as lines.
func (*CIFuzzRunner) CommandOutput ¶ added in v0.26.0
func (r *CIFuzzRunner) CommandOutput(t *testing.T, command string, opts *CommandOptions) (string, string)
CommandOutput runs "cifuzz <command> <args>" and returns stderr and output.
func (*CIFuzzRunner) CommandWithFilterForInstructions ¶ added in v0.20.0
func (r *CIFuzzRunner) CommandWithFilterForInstructions(t *testing.T, command string, opts *CommandOptions) []string
CommandWithFilterForInstructions runs "cifuzz <command> <args>" and returns any indented lines which the command prints to stderr (which we expect to be lines which should be added to some source or config file).
func (*CIFuzzRunner) Run ¶
func (r *CIFuzzRunner) Run(t *testing.T, opts *RunOptions)