Skip to content

Commit fee1f72

Browse files
kola: distinguish between scos and rhocs distros
Despite SCOS and RHCOS being largely similar, certain features (such as s390x Secure Execution and LUKS-CEX) are only supported on RHCOS. It does not make sense to run RHCOS-only tests on SCOS.
1 parent cb3ea70 commit fee1f72

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

mantle/cmd/kola/options.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,6 @@ func syncOptionsImpl(useCosa bool) error {
370370

371371
if kola.Options.Distribution == "" {
372372
kola.Options.Distribution = kolaDistros[0]
373-
} else if kola.Options.Distribution == "scos" {
374-
// Consider SCOS the same as RHCOS for now
375-
kola.Options.Distribution = "rhcos"
376373
} else if err := validateOption("distro", kola.Options.Distribution, kolaDistros); err != nil {
377374
return err
378375
}

mantle/util/distros.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ import (
2626
// the path to an artifact (usually a disk image).
2727
func TargetDistroFromName(artifact string) string {
2828
basename := filepath.Base(artifact)
29-
if strings.HasPrefix(basename, "rhcos-") || strings.HasPrefix(basename, "scos-") {
29+
if strings.HasPrefix(basename, "rhcos-") {
3030
return "rhcos"
31+
} else if strings.HasPrefix(basename, "scos-") {
32+
return "scos"
3133
}
3234
// For now, just assume fcos
3335
return "fcos"
@@ -36,10 +38,8 @@ func TargetDistroFromName(artifact string) string {
3638
// TargetDistro returns the distribution of a cosa build
3739
func TargetDistro(build *builds.Build) (string, error) {
3840
switch build.Name {
39-
case "rhcos":
40-
return "rhcos", nil
41-
case "scos":
42-
return "rhcos", nil
41+
case "rhcos", "scos":
42+
return build.Name, nil
4343
case "fedora-coreos":
4444
return "fcos", nil
4545
default:

0 commit comments

Comments
 (0)