Documentation ¶
Index ¶
- Constants
- Variables
- func CheckConsole(output []byte, t *register.Test) (bool, []string)
- func GetBaseTestName(testName string) string
- func GetRerunnableTestName(testName string) (string, bool)
- func HasString(s string, slice []string) bool
- func IsWarningOnFailure(testName string) bool
- func MatchesPatterns(s string, patterns []string) (bool, error)
- func NewFlight(pltfrm string) (flight platform.Flight, err error)
- func ParseDenyListYaml(pltfrm string) error
- func RegisterExternalTests(dir string) error
- func RegisterExternalTestsWithPrefix(dir, prefix string) error
- func RunTests(patterns []string, multiply int, rerun bool, rerunSuccessTags []string, ...) error
- func RunUpgradeTests(patterns []string, rerun bool, pltfrm, outputDir string) error
- func ScpKolet(machines []platform.Machine) error
- func SetupOutputDir(outputDir, platform string) (string, error)
- type DenyListObj
- type InitConfigData
- type KoletResult
- type ManifestData
- type NativeRunner
Constants ¶
const AllowRerunSuccessTag = "allow-rerun-success"
The string for the tag that indicates a test has been marked as allowing rerun success. In some cases the internal test framework will add this tag to a test to indicate if the test passes a rerun to allow the run to succeed.
const InstalledTestDefaultTest = "test.sh"
InstalledTestDefaultTest is a special name; see the README-kola-ext.md for more information.
const InstalledTestMetaPrefix = "# kola:"
InstalledTestMetaPrefix is the prefix for JSON-formatted metadata
const InstalledTestMetaPrefixYaml = "## kola:"
InstalledTestMetaPrefixYaml is the prefix for YAML-formatted metadata
const InstalledTestsDir = "/usr/lib/coreos-assembler/tests/kola"
InstalledTestsDir is a directory where "installed" external can be placed; for example, a project like ostree can install tests at /usr/lib/coreos-assembler/tests/kola/ostree/... and this will be automatically picked up.
const KoletExtTestUnit = "kola-runext"
const KoletRebootAckFifo = "/run/kolet-reboot-ack"
const NeedsInternetTag = "needs-internet"
This is the same string from https://salsa.debian.org/ci-team/autopkgtest/raw/master/doc/README.package-tests.rst Specifying this in the tags list is required to denote a need for Internet access
const PlatformIndependentTag = "platform-independent"
PlatformIndependentTag is currently equivalent to platform: qemu, but that may change in the future. For more, see the doc in external-tests.md.
const SkipBaseChecksTag = "skip-base-checks"
Don't e.g. check console for kernel errors, SELinux AVCs, etc.
const SkipConsoleWarningsTag = "skip-console-warnings"
SkipConsoleWarningsTag will cause kola not to check console for kernel errors. This overlaps with SkipBaseChecksTag above, but is really a special flag for kola-denylist.yaml.
Variables ¶
var ( Options = platform.Options{} AWSOptions = awsapi.Options{Options: &Options} // glue to set platform options from main AzureOptions = azureapi.Options{Options: &Options} // glue to set platform options from main DOOptions = doapi.Options{Options: &Options} // glue to set platform options from main ESXOptions = esxapi.Options{Options: &Options} // glue to set platform options from main GCPOptions = gcloudapi.Options{Options: &Options} // glue to set platform options from main OpenStackOptions = openstackapi.Options{Options: &Options} // glue to set platform options from main PacketOptions = packetapi.Options{Options: &Options} // glue to set platform options from main QEMUOptions = qemu.Options{Options: &Options} // glue to set platform options from main QEMUIsoOptions = qemuiso.Options{Options: &Options} // glue to set platform options from main CosaBuild *util.LocalBuild // this is a parsed cosa build TestParallelism int //glue var to set test parallelism from main TAPFile string // if not "", write TAP results here NoNet bool // Disable tests requiring Internet // ForceRunPlatformIndependent will cause tests that claim platform-independence to run ForceRunPlatformIndependent bool // SkipConsoleWarnings is set via SkipConsoleWarningsTag in kola-denylist.yaml SkipConsoleWarnings bool DenylistedTests []string // tests which are on the denylist WarnOnErrorTests []string // denylisted tests we are going to run and warn in case of error Tags []string // tags to be ran // Sharding is a string of the form: hash:m/n where m and n are integers to run only tests which hash to m. Sharding string ErrWarnOnTestFail = errors.New("A test marked as warn:true failed.") )
Functions ¶
func CheckConsole ¶
CheckConsole checks some console output for badness and returns short descriptions of any bad lines it finds along with a boolean indicating if the configuration has the bad lines marked as warnOnly or not (for things we don't want to error for). If t is specified, its flags are respected and tags possibly updated for rerun success.
func GetBaseTestName ¶
func GetRerunnableTestName ¶
func IsWarningOnFailure ¶
func MatchesPatterns ¶
MatchesPatterns returns true if `s` matches one of the patterns in `patterns`.
func ParseDenyListYaml ¶
func RegisterExternalTests ¶
RegisterExternalTests iterates over a directory, and finds subdirectories that have exactly one executable binary.
func RunUpgradeTests ¶
func SetupOutputDir ¶
Types ¶
type DenyListObj ¶
type InitConfigData ¶
type InitConfigData struct {
ConfigVariant string `json:"coreos-assembler.config-variant"`
}
type KoletResult ¶
type KoletResult struct {
Reboot string
}
KoletResult is serialized JSON passed from kolet to the harness