diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a3253339c035e..e6c50a554717d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -546,6 +546,7 @@ in { restic = handleTest ./restic.nix {}; retroarch = handleTest ./retroarch.nix {}; robustirc-bridge = handleTest ./robustirc-bridge.nix {}; + rocsparse = handleTest ./rocsparse.nix {}; roundcube = handleTest ./roundcube.nix {}; rspamd = handleTest ./rspamd.nix {}; rss2email = handleTest ./rss2email.nix {}; diff --git a/nixos/tests/rocsparse.nix b/nixos/tests/rocsparse.nix new file mode 100644 index 0000000000000..f75bdf722b503 --- /dev/null +++ b/nixos/tests/rocsparse.nix @@ -0,0 +1,15 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: + +with lib; + +{ + name = "rocsparse"; + meta.maintainers = with maintainers; [ Madouura ]; + nodes.machine = { }; + + # This will likely always fail due to this being a virtual machine with no gpu + testScript = '' + machine.wait_for_unit("default.target") + machine.succeed("${(pkgs.rocsparse.override { buildTests = true; }).test}/bin/rocsparse-test") + ''; +}) diff --git a/pkgs/development/libraries/rocsparse/default.nix b/pkgs/development/libraries/rocsparse/default.nix index f6321d4e08a3c..0dd7a07877989 100644 --- a/pkgs/development/libraries/rocsparse/default.nix +++ b/pkgs/development/libraries/rocsparse/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, nixosTests , cmake , rocm-cmake , rocm-runtime @@ -138,6 +139,10 @@ in stdenv.mkDerivation rec { rmdir $out/bin ''; + passthru.tests = { + smoke-test = nixosTests.rocsparse; + }; + meta = with lib; { description = "ROCm SPARSE implementation"; homepage = "https://github.com/ROCmSoftwarePlatform/rocSPARSE";