about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix
blob: 6f2d3c7882890a2790bbd25d2f1241079a5ab22f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ lib
, makeImpureTest
, clinfo
, clr
, rocm-smi
}:

makeImpureTest {
  name = "rocm-smi";
  testedPackage = "rocmPackages_6.clr";
  nativeBuildInputs = [ clinfo rocm-smi ];
  OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors";

  testScript = ''
    # Test fails if the number of platforms is 0
    clinfo | grep -E 'Number of platforms * [1-9]'
    rocm-smi | grep -A1 GPU
  '';

  meta = with lib; {
    maintainers = teams.rocm.members;
  };
}