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