about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/rocm-opencl-icd/test.nix
blob: 398a4818e7c365d89af54735dbb031cdafbe31fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }:
makeImpureTest {
  name = "rocm-opencl";
  testedPackage = "rocm-opencl-icd";

  nativeBuildInputs = [ clinfo rocm-smi ];

  OCL_ICD_VENDORS = "${rocm-opencl-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;
  };
}