algorithms

package
v0.0.0-...-8221b33 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDependencyDetectorNotExisting = errors.New("the dependency detection strategy does not exist")

Functions

This section is empty.

Types

type DependencyDetector

type DependencyDetector func([]string, *runner.RunnerSet) (DependencyGraph, error)

type DependencyGraph

type DependencyGraph map[string]map[string]struct{}

DependencyGraph represents the graph encoding the dependencies between the tests of a test suite. In the graph, each node is a test of the test suite and each edge represents the dependency relationship between the tests.

func DependencyGraphFromJson

func DependencyGraphFromJson(fileName string) (DependencyGraph, error)

DependencyGraphFromJson returns a DependencyGraph form a JSON file. If there is any error it is returned.

func MEMFAST

func MEMFAST(tests []string, r *runner.RunnerSet) (DependencyGraph, error)

func NewDependencyGraph

func NewDependencyGraph(nodes []string) DependencyGraph

NewDependencyGraph returns a DependencyGraph without any edges from a list of tests.

func PFAST

func PFAST(tests []string, r *runner.RunnerSet) (DependencyGraph, error)

func PraDet

func PraDet(tests []string, oracle *runner.RunnerSet) (DependencyGraph, error)

func (DependencyGraph) Equal

func (d DependencyGraph) Equal(other DependencyGraph) bool

func (DependencyGraph) GetSchedules

func (d DependencyGraph) GetSchedules(tests []string) [][]string

GetSchedules returns the schedules needed to cover all the provided tests based on the dependencies into the dependency graph.

func (DependencyGraph) ToDOT

func (d DependencyGraph) ToDOT(w io.Writer)

ToDOT returns a DOT representation of the dependencies relationship between tests of a test suite.

func (DependencyGraph) ToJSON

func (d DependencyGraph) ToJSON(w io.Writer)

ToJSON returns a JSON representation of the dependencies relationship between tests of a test suite.

Jump to

Keyboard shortcuts

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