about summary refs log tree commit diff
path: root/pkgs/development/rocm-modules/5/clr/test.nix
blob: c02bb4da888604bdbaaa6f592d97a32409571cd0 (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 = "clr-icd";
  testedPackage = "rocmPackages.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;
  };
}