mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-20 17:55:41 +03:00
55187a8218
* This adds a convenience method of running `nextest` within `cargo llvm-cov` without having to wire up the internal details manually
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ cargoNextest
|
|
, lib
|
|
, linkFarmFromDrvs
|
|
}:
|
|
|
|
let
|
|
nextestSimple = withLlvmCov: cargoNextest {
|
|
inherit withLlvmCov;
|
|
src = ./simple;
|
|
pname = "nextest-simple${lib.optionalString withLlvmCov "-llvm-cov"}";
|
|
cargoArtifacts = null;
|
|
};
|
|
|
|
nextestPartitionsCount = withLlvmCov: cargoNextest {
|
|
inherit withLlvmCov;
|
|
src = ./simple;
|
|
pname = "nextest-partitions-count${lib.optionalString withLlvmCov "-llvm-cov"}";
|
|
partitions = 4;
|
|
partitionType = "count";
|
|
cargoArtifacts = null;
|
|
};
|
|
|
|
nextestPartitionsHash = withLlvmCov: cargoNextest {
|
|
inherit withLlvmCov;
|
|
src = ./simple;
|
|
pname = "nextest-partitions-hash${lib.optionalString withLlvmCov "-llvm-cov"}";
|
|
partitions = 4;
|
|
partitionType = "hash";
|
|
cargoArtifacts = null;
|
|
};
|
|
|
|
nextestProcMacro = withLlvmCov: cargoNextest {
|
|
inherit withLlvmCov;
|
|
src = ./proc-macro;
|
|
pname = "nextest-proc-macro${lib.optionalString withLlvmCov "-llvm-cov"}";
|
|
cargoArtifacts = null;
|
|
};
|
|
in
|
|
linkFarmFromDrvs "nextestTests" [
|
|
(nextestSimple false)
|
|
(nextestSimple true)
|
|
(nextestPartitionsCount false)
|
|
(nextestPartitionsCount true)
|
|
(nextestPartitionsHash false)
|
|
#(nextestPartitionsHash true) # not yet supported
|
|
(nextestProcMacro false)
|
|
(nextestProcMacro true)
|
|
]
|