Skip to content

Commit

Permalink
test(oracle): fix test_ubuntu_drivers_installed
Browse files Browse the repository at this point in the history
Since the cc_ubuntu_drivers module runs the ubuntu-drivers command with
the "--gpgpu" flag, only a small subset of nvidia packages are installed
which do not include "linux-modules-nvidia" that the test originally
asserted were installed. Now, just look for any nvidia-*-server packages
that are installed.
  • Loading branch information
a-dubs committed Jan 31, 2025
1 parent 9e0c338 commit de4d355
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/integration_tests/modules/test_ubuntu_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
license-accepted: true
"""

# NOTE(VM.GPU2.1 is not in all availability_domains: use qIZq:US-ASHBURN-AD-1)


@pytest.mark.adhoc # Expensive instance type
@pytest.mark.skipif(PLATFORM != "oci", reason="Test is OCI specific")
def test_ubuntu_drivers_installed(session_cloud: IntegrationCloud):
with session_cloud.launch(
launch_kwargs={"instance_type": "VM.GPU2.1"}, user_data=USER_DATA
launch_kwargs={"instance_type": "VM.GPU.A10.1"}, user_data=USER_DATA
) as client:
log = client.read_from_file("/var/log/cloud-init.log")
verify_clean_log(log)
Expand All @@ -32,7 +30,7 @@ def test_ubuntu_drivers_installed(session_cloud: IntegrationCloud):
result = client.execute("dpkg -l | grep nvidia")
assert result.ok, "No nvidia packages found"
assert re.search(
r"ii\s+linux-modules-nvidia-\d+-server", result.stdout
r"ii\s+nvidia.*-\d+-server", result.stdout
), (
f"Did not find specific nvidia drivers packages in:"
f" {result.stdout}"
Expand Down

0 comments on commit de4d355

Please sign in to comment.