Skip to content

Commit

Permalink
nixosTests.rocprim: init
Browse files Browse the repository at this point in the history
  • Loading branch information
Madouura committed Nov 3, 2022
1 parent 249540a commit 04ee95f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ in {
restic = handleTest ./restic.nix {};
retroarch = handleTest ./retroarch.nix {};
robustirc-bridge = handleTest ./robustirc-bridge.nix {};
rocprim = handleTest ./rocprim.nix {};
roundcube = handleTest ./roundcube.nix {};
rspamd = handleTest ./rspamd.nix {};
rss2email = handleTest ./rss2email.nix {};
Expand Down
18 changes: 18 additions & 0 deletions nixos/tests/rocprim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import ./make-test-python.nix ({ lib, pkgs, ... }:

with lib;

{
name = "rocprim";
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("find ${(pkgs.rocprim.override { buildTests = true; }).test}/bin -maxdepth 1 -type f -executable -name 'test_*' > tests")
# We can do this directly with find, but can't get the command to fail
machine.succeed("for test in $(cat tests); do $test; done")
'';
})
5 changes: 5 additions & 0 deletions pkgs/development/libraries/rocprim/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, nixosTests
, cmake
, rocm-cmake
, rocm-runtime
Expand Down Expand Up @@ -75,6 +76,10 @@ stdenv.mkDerivation rec {
rmdir $out/bin
'';

passthru.tests = {
smoke-test = nixosTests.rocprim;
};

meta = with lib; {
description = "ROCm parallel primitives";
homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM";
Expand Down

0 comments on commit 04ee95f

Please sign in to comment.