Categorygithub.com/src-d/regression-core
modulepackage
0.0.0-20191011120110-cd490605ba68
Repository: https://github.com/src-d/regression-core.git
Documentation: pkg.go.dev

# README

regression-core

regression-core* holds the common functionality used by regression testers.

Functionality provided:

  • Binary download from github releases
  • Binary building from local or remote locations, can specify tag/branch or pull request
  • Command execution and resource retrieval (max memory, wall/system/user time)
  • git server execution
  • Generic server execution
  • Repository cache management
import (
  "github.com/src-d/regression-core"
)

...

config := regression.NewConfig()
config.RepositoriesCache = "/tmp/repos"
git := regression.NewGitServer(config)
git.Start()

License

Licensed under the terms of the Apache License Version 2.0. See the LICENSE file for the full license text.

# Functions

Average gets the average consumption from a set of results.
CopyFile makes a file copy with the specified permission.
CreateTempDir creates a new temporary directory in the default temp dir.
No description provided by the author
GetExtras extracts the files from the tarball contained in the extras list to the provided path.
No description provided by the author
IsRepo returns true if the version provided matches the repository format, for example: remote:master.
NewBinary creates a new Binary structure.
NewBuild creates a new Build structure.
NewConfig returns an empty config with initialized OS.
NewExecutor creates a new Executor struct.
No description provided by the author
No description provided by the author
NewRepositories creates a new Repositories set.
NewServer creates a new Server struct.
Percent returns the percentage difference between to int64.
RecursiveCopy copies a directory to a destination path.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
ErrBinaryNotFound is returned when the executable is not found in the release tarball.
ErrExtraFile is returned when there is a problem saving an extra file.
ErrInvalidVersion means that the provided version is malformed.
ErrNotRun means that the command was not started.
ErrReferenceNotFound means that the provided reference is not found.
ErrRusageNotAvailable means that resource usage could not be collected.
ErrTarball is returned when there is a problem with a tarball.
No description provided by the author

# Structs

Binary struct contains information and functionality to prepare and use a binary version.
Build structure holds information and functionality to generate binaries from source code.
BuildStep describes a command used to build a tool.
CIConfig is config that represents CI build metadata, values of CIConfig will be added to metrics as labels.
Comparison has the percentages of change between two runs.
Config holds the general configuration for tests.
Executor structure holds information and functionality to execute commands and get resource usage.
No description provided by the author
GitServerConfig holds the configuration for GitServer.
PromConfig contains prometheus pushgateway configuration info.
No description provided by the author
RepoDescription holds the information about a single repository.
Repositories struct has the information about a set of repositories and functionality to download them.
Result struct holds resource usage from a run.
Server struct describes a daemon.
Tool describes a project to build and test.