Add no-criu flag for running tests
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9f08965699
commit
2974e485f3
@ -21,12 +21,14 @@ import (
|
|||||||
var (
|
var (
|
||||||
address string
|
address string
|
||||||
noDaemon bool
|
noDaemon bool
|
||||||
|
noCriu bool
|
||||||
supportsCriu bool
|
supportsCriu bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
|
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
|
||||||
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
|
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
|
||||||
|
flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +45,7 @@ func TestMain(m *testing.M) {
|
|||||||
testutil.RequiresRootM()
|
testutil.RequiresRootM()
|
||||||
// check if criu is installed on the system
|
// check if criu is installed on the system
|
||||||
_, err := exec.LookPath("criu")
|
_, err := exec.LookPath("criu")
|
||||||
supportsCriu = err == nil
|
supportsCriu = err == nil && !noCriu
|
||||||
|
|
||||||
var (
|
var (
|
||||||
cmd *exec.Cmd
|
cmd *exec.Cmd
|
||||||
|
Loading…
Reference in New Issue
Block a user