From 46494b54c9709afee2b908a2dbc6e006d57ebfa2 Mon Sep 17 00:00:00 2001 From: Adphi Date: Tue, 9 Aug 2022 13:35:42 +0200 Subject: [PATCH] tests: run build tests in parallel Signed-off-by: Adphi --- builder_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builder_test.go b/builder_test.go index 9498e87..aac9857 100644 --- a/builder_test.go +++ b/builder_test.go @@ -45,6 +45,7 @@ func testSysconfig(t *testing.T, ctx context.Context, img, sysconf, kernel, init } func TestSyslinuxCfg(t *testing.T) { + t.Parallel() tests := []struct { image string kernel string @@ -118,12 +119,14 @@ func TestSyslinuxCfg(t *testing.T) { sysconfig: syslinuxCfgCentOS, }, } - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() exec.SetDebug(true) for _, test := range tests { + test := test t.Run(test.image, func(t *testing.T) { + t.Parallel() + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() testSysconfig(t, ctx, test.image, test.sysconfig, test.kernel, test.initrd) }) }