Skip to content

Commit

Permalink
kola: Use skip func to skip cl.misc.nvidia
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremi Piotrowski <[email protected]>
  • Loading branch information
jepio committed Apr 26, 2024
1 parent 163fbab commit 14e17d4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions kola/tests/misc/nvidia.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package misc
import (
"bytes"
"fmt"
"strings"
"time"

"github.com/coreos/go-semver/semver"
"github.com/coreos/pkg/capnslog"
"github.com/flatcar/mantle/kola"
"github.com/flatcar/mantle/kola/cluster"
Expand All @@ -28,13 +30,19 @@ func init() {
Platforms: []string{"azure"},
Architectures: []string{"amd64"},
Flags: []register.Flag{register.NoEnableSelinux},
SkipFunc: skipOnNonGpu,
})
}

func verifyNvidiaInstallation(c cluster.TestCluster) {
if kola.AzureOptions.Size != "Standard_NC6s_v3" {
c.Skip("skipping due to wrong instance size")
func skipOnNonGpu(version semver.Version, channel, arch, platform string) bool {
// N stands for GPU instance obviously :)
if platform == "azure" && strings.Contains(kola.AzureOptions.Size, "N") {
return false
}
return true
}

func verifyNvidiaInstallation(c cluster.TestCluster) {
m := c.Machines()[0]

nvidiaStatusRetry := func() error {
Expand Down

0 comments on commit 14e17d4

Please sign in to comment.