From 55cd7dd7f90d19332464ac946727297de1969483 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 6 May 2014 14:44:42 +0200 Subject: [PATCH] grapdriver: Skip tests on non-supported backends For now this means the btrfs backend is skipped when run inside make test. You can however run it manually if you want. Docker-DCO-1.1-Signed-off-by: Alexander Larsson (github: alexlarsson) --- daemon/graphdriver/graphtest/graphtest.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/graphdriver/graphtest/graphtest.go b/daemon/graphdriver/graphtest/graphtest.go index c83c840bc3..f8ccb2ef33 100644 --- a/daemon/graphdriver/graphtest/graphtest.go +++ b/daemon/graphdriver/graphtest/graphtest.go @@ -31,6 +31,9 @@ func newDriver(t *testing.T, name string) *Driver { d, err := graphdriver.GetDriver(name, root) if err != nil { + if err == graphdriver.ErrNotSupported { + t.Skip("Driver %s not supported", name) + } t.Fatal(err) } return &Driver{d, root, 1} @@ -54,7 +57,7 @@ func GetDriver(t *testing.T, name string) graphdriver.Driver { func PutDriver(t *testing.T) { if drv == nil { - t.Fatal("No driver to put!") + t.Skip("No driver to put!") } drv.refCount-- if drv.refCount == 0 {