run

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitQualifiedName

func SplitQualifiedName(name string) (string, string)

SplitQualifiedName splits a qualified name into module and test name.

Types

type Job

type Job struct {
	// Full qualified name of the test or control function to be executed.
	Name string

	// Working directory for the job.
	Dir string

	// Test suite the job belongs to.
	Suite *Suite
	// contains filtered or unexported fields
}

Job represents a single job to be executed.

func (*Job) ID

func (j *Job) ID() string

A unique job identifier.

type Ledger

type Ledger struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Ledger is a worker pool for executing jobs.

func NewLedger

func NewLedger(n int) *Ledger

func (*Ledger) Done

func (l *Ledger) Done(job *Job)

func (*Ledger) Jobs

func (l *Ledger) Jobs() []*Job

func (*Ledger) NewJob

func (l *Ledger) NewJob(name string, suite *Suite) *Job

func (*Ledger) Run

func (l *Ledger) Run(ctx context.Context, jobs <-chan *Job) <-chan Result

type Result

type Result struct {
	*Job
	k3r.Test
	tests.Event
}

func (*Result) ID

func (r *Result) ID() string

type Runner

type Runner interface {
	// Run the jobs in the given channel.
	Run(ctx context.Context, jobs <-chan *Job) <-chan Result
}

Runner is a test runner.

type Suite

type Suite struct {
	*project.Config
	RuntimePaths []string
}

Suite represents a test suite.

func NewSuite

func NewSuite(p *project.Config) (*Suite, error)

NewSuite creates a new suite from the given files. It expects either a single directory as argument or a list of regular .ttcn3 files.

Calling NewSuite with an empty argument list will create a suite from current working directory or, if set, from NTT_SOURCE_DIR.

NewSuite will read manifest (package.yml) if any.

Jump to

Keyboard shortcuts

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