From b350b443d084536064dd64c4ccec6f290b5a1084 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 8 Aug 2016 21:57:50 +0200 Subject: [PATCH] Stop backend tests early on failure --- src/restic/backend/test/tests.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/restic/backend/test/tests.go b/src/restic/backend/test/tests.go index e030e6bbf..34e30cc41 100644 --- a/src/restic/backend/test/tests.go +++ b/src/restic/backend/test/tests.go @@ -272,6 +272,7 @@ func TestLoad(t testing.TB) { if l > len(d) { if err != io.ErrUnexpectedEOF { t.Errorf("Load(%d, %d) did not return io.ErrUnexpectedEOF", len(buf), int64(o)) + continue } err = nil buf = buf[:len(d)] @@ -340,6 +341,7 @@ func TestLoadNegativeOffset(t testing.TB) { if len(buf) > -o { if err != io.ErrUnexpectedEOF { t.Errorf("Load(%d, %d) did not return io.ErrUnexpectedEOF", len(buf), o) + continue } err = nil buf = buf[:-o] @@ -347,10 +349,12 @@ func TestLoadNegativeOffset(t testing.TB) { if err != nil { t.Errorf("Load(%d, %d) returned error: %v", len(buf), o, err) + continue } if n != len(buf) { t.Errorf("Load(%d, %d) returned short read, only got %d bytes", len(buf), o, n) + continue } p := len(data) + o