Skip to content

Commit

Permalink
Ensure amd test cases only run with docker driver on amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
fbyrne committed Oct 10, 2024
1 parent 6e27c5e commit 27809bc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,10 @@ func TestAddons(t *testing.T) {
// so we override that here to let minikube auto-detect appropriate cgroup driver
os.Setenv(constants.MinikubeForceSystemdEnv, "")

args := append([]string{"start", "-p", profile, "--wait=true", "--memory=4000", "--alsologtostderr", "--addons=registry", "--addons=metrics-server", "--addons=volumesnapshots", "--addons=csi-hostpath-driver", "--addons=gcp-auth", "--addons=cloud-spanner", "--addons=inspektor-gadget", "--addons=nvidia-device-plugin", "--addons=yakd", "--addons=volcano"}, StartArgs()...)
args := append([]string{"start", "-p", profile, "--wait=true", "--memory=4000", "--alsologtostderr", "--addons=registry", "--addons=metrics-server", "--addons=volumesnapshots", "--addons=csi-hostpath-driver", "--addons=gcp-auth", "--addons=cloud-spanner", "--addons=inspektor-gadget", "--addons=nvidia-device-plugin", "--addons=yakd", "--addons=volcano", "--addons=amd-gpu-device-plugin"}, StartArgs()...)
if !NoneDriver() {
args = append(args, "--addons=ingress", "--addons=ingress-dns", "--addons=storage-provisioner-rancher")
}
if DockerDriver() && amd64Platform() {
args = append(args, "--addons=amd-gpu-device-plugin")
}
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil {
t.Fatalf("%s failed: %v", rr.Command(), err)
Expand Down Expand Up @@ -153,9 +150,7 @@ func TestAddons(t *testing.T) {
{"LocalPath", validateLocalPathAddon},
{"NvidiaDevicePlugin", validateNvidiaDevicePlugin},
{"Yakd", validateYakdAddon},
}
if DockerDriver() && amd64Platform() {
tests = append(tests, TestCase{"AmdGpuDevicePlugin", validateAmdGpuDevicePlugin})
{"AmdGpuDevicePlugin", validateAmdGpuDevicePlugin},
}

for _, tc := range tests {
Expand Down Expand Up @@ -969,6 +964,9 @@ func validateNvidiaDevicePlugin(ctx context.Context, t *testing.T, profile strin

// validateAmdGpuDevicePlugin tests the amd-gpu-device-plugin addon by ensuring the pod comes up and the addon disables
func validateAmdGpuDevicePlugin(ctx context.Context, t *testing.T, profile string) {
if !(DockerDriver() && amd64Platform()) {
t.Skipf("skip amd gpu test on all but docker driver and amd64 platform")
}
defer disableAddon(t, "amd-gpu-device-plugin", profile)
defer PostMortemLogs(t, profile)

Expand Down

0 comments on commit 27809bc

Please sign in to comment.