Browse Source

Produce error if no kernels found

tags/v0.2
dump_stack() 1 year ago
parent
commit
ea738c994f
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      main.go

+ 8
- 0
main.go View File

@@ -414,6 +414,8 @@ func readArtifactConfig(path string) (artifactCfg artifact, err error) {
func performCI(ka artifact, kcfg kernelConfig, binaryPath, testPath string,
qemuTimeout, dockerTimeout time.Duration) (err error) {

found := false

swg := sizedwaitgroup.New(runtime.NumCPU())
for _, kernel := range kcfg.Kernels {
var supported bool
@@ -423,12 +425,18 @@ func performCI(ka artifact, kcfg kernelConfig, binaryPath, testPath string,
}

if supported {
found = true
swg.Add()
go whatever(&swg, ka, kernel, binaryPath, testPath,
qemuTimeout, dockerTimeout)
}
}
swg.Wait()

if !found {
err = errors.New("No supported kernels found")
}

return
}


Loading…
Cancel
Save