cn6: enable extra test utils
This commit is contained in:
parent
3be896d90d
commit
f9581cfb59
@ -3,8 +3,18 @@
|
||||
, babeltrace2
|
||||
, pkg-config
|
||||
, uthash
|
||||
, enableTest ? false
|
||||
, mpi ? null
|
||||
, clangOmpss2 ? null
|
||||
, tampi ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert (enableTest -> (mpi != null));
|
||||
assert (enableTest -> (clangOmpss2 != null));
|
||||
assert (enableTest -> (tampi != null));
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cn6";
|
||||
version = "${src.shortRev}";
|
||||
@ -13,7 +23,8 @@ stdenv.mkDerivation rec {
|
||||
babeltrace2
|
||||
pkg-config
|
||||
uthash
|
||||
];
|
||||
mpi
|
||||
] ++ optionals (enableTest) [ mpi clangOmpss2 tampi ];
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm03.bsc.es/rarias/cn6.git";
|
||||
@ -22,4 +33,18 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postBuild = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
make timediff timediff_mpi
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
cp timediff timediff_mpi sync-err.sh $out/bin/
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user