From 2974e485f32eacfddb06852efd7ef4b235a7b4eb Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 31 Jul 2017 15:54:34 -0400 Subject: [PATCH] Add no-criu flag for running tests Signed-off-by: Michael Crosby --- client_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index 379d876ac..68cc75612 100644 --- a/client_test.go +++ b/client_test.go @@ -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