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 (
|
||||
address string
|
||||
noDaemon bool
|
||||
noCriu bool
|
||||
supportsCriu bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
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(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
@ -43,7 +45,7 @@ func TestMain(m *testing.M) {
|
||||
testutil.RequiresRootM()
|
||||
// check if criu is installed on the system
|
||||
_, err := exec.LookPath("criu")
|
||||
supportsCriu = err == nil
|
||||
supportsCriu = err == nil && !noCriu
|
||||
|
||||
var (
|
||||
cmd *exec.Cmd
|
||||
|
Loading…
Reference in New Issue
Block a user