Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Provide ability to skip a test based on the runtime being used #59

@jodh-intel

Description

@jodh-intel

Currently, some of the tests make use of Skip() (ginkgo). At some future point they will also be using skip (bats) too. These calls skip the tests unconditionally. However, we are likely to need ways to skip a test but only for particular runtime(s) [1]:

Something like:

if kata.Runtime("cc") {
    Skip("Issue: ...")
}

We should also support any:

if kata.Runtime("any") {
    Skip("Issue: ...")
}

... and maybe a regex like:

if kata.Runtime("cc|runv") {
    Skip("Issue: ...")
}

We'll need kata.Runtime(name string) to check to see which runtime the kata-runtime symlink actually points to. If the link name ends in -cc [2], it's a Clear Containers-based runtime, else runv.

We can then compare the fully resolved value of the Runtime path with the runtime type the test is requesting be skipped and return true/false as appropriate.


[1] - runtime names should be specified using the same syntax as used for the build. Namely cc or runv (or all). See kata-containers/runtime#16.
[2] - Or, run the runtime and check for a known string such as:

$ kata-runtime --help | grep -q clearcontainers

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssue or PR was not updated in a timely fashion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions