Produce error if no kernels found
This commit is contained in:
parent
cc87a792c5
commit
ea738c994f
8
main.go
8
main.go
@ -414,6 +414,8 @@ func readArtifactConfig(path string) (artifactCfg artifact, err error) {
|
|||||||
func performCI(ka artifact, kcfg kernelConfig, binaryPath, testPath string,
|
func performCI(ka artifact, kcfg kernelConfig, binaryPath, testPath string,
|
||||||
qemuTimeout, dockerTimeout time.Duration) (err error) {
|
qemuTimeout, dockerTimeout time.Duration) (err error) {
|
||||||
|
|
||||||
|
found := false
|
||||||
|
|
||||||
swg := sizedwaitgroup.New(runtime.NumCPU())
|
swg := sizedwaitgroup.New(runtime.NumCPU())
|
||||||
for _, kernel := range kcfg.Kernels {
|
for _, kernel := range kcfg.Kernels {
|
||||||
var supported bool
|
var supported bool
|
||||||
@ -423,12 +425,18 @@ func performCI(ka artifact, kcfg kernelConfig, binaryPath, testPath string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if supported {
|
if supported {
|
||||||
|
found = true
|
||||||
swg.Add()
|
swg.Add()
|
||||||
go whatever(&swg, ka, kernel, binaryPath, testPath,
|
go whatever(&swg, ka, kernel, binaryPath, testPath,
|
||||||
qemuTimeout, dockerTimeout)
|
qemuTimeout, dockerTimeout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
swg.Wait()
|
swg.Wait()
|
||||||
|
|
||||||
|
if !found {
|
||||||
|
err = errors.New("No supported kernels found")
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user