Unverified Commit b1cf6f28 authored by Konstantinos Tsakalozos's avatar Konstantinos Tsakalozos Committed by GitHub
Browse files

Faster nvidia test abort (#193)

parent e29eb46f
......@@ -136,6 +136,13 @@ def microk8s_enable(addon):
addon: name of the addon
# NVidia pre-check so as to not wait for a timeout.
if addon == 'gpu':
nv_out = run_until_success("lsmod", timeout_insec=10)
if "nvidia" not in nv_out:
print("Not a cuda capable system. Will not test gpu addon")
raise CalledProcessError(1, "Nothing to do for gpu")
cmd = '/snap/bin/microk8s.enable {}'.format(addon)
return run_until_success(cmd, timeout_insec=300)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment