tests: run build tests in parallel

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-08-09 13:35:42 +02:00
parent b09f0e07ad
commit 46494b54c9
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF
1 changed files with 5 additions and 2 deletions

View File

@ -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)
})
}